put in config framework for auto-update ability, plugins, etc.
This commit is contained in:
parent
8f83c4ab64
commit
d763485752
21
boot.php
21
boot.php
|
@ -2,6 +2,8 @@
|
|||
|
||||
set_time_limit(0);
|
||||
|
||||
define ( 'BUILD_ID' , 1000 );
|
||||
|
||||
define ( 'EOL', "<br />\r\n");
|
||||
|
||||
define ( 'REGISTER_CLOSED', 0);
|
||||
|
@ -162,6 +164,25 @@ function system_unavailable() {
|
|||
killme();
|
||||
}}
|
||||
|
||||
|
||||
if(! function_exists('check_config')) {
|
||||
function check_config(&$a) {
|
||||
$r = q("SELECT * FROM `config` WHERE `cat` = 'system' AND `k` IN ('url','build')");
|
||||
if(! count($r)) {
|
||||
q("INSERT INTO `config` (`cat`,`k`,`v`) VALUES ( 'system', 'url', '%s' )",
|
||||
dbesc($a->get_baseurl())
|
||||
);
|
||||
q("INSERT INTO `config` (`cat`,`k`,`v`) VALUES ( 'system', 'build', '%s' )",
|
||||
dbesc(BUILD_ID)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}}
|
||||
|
||||
|
||||
|
||||
if(! function_exists('replace_macros')) {
|
||||
function replace_macros($s,$r) {
|
||||
|
||||
|
|
11
database.sql
11
database.sql
|
@ -32,6 +32,17 @@ CREATE TABLE IF NOT EXISTS `challenge` (
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `config` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`cat` char(255) NOT NULL,
|
||||
`k` char(255) NOT NULL,
|
||||
`v` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MYISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Table structure for table `contact`
|
||||
--
|
||||
|
|
Loading…
Reference in a new issue