From f0231c8d9f41749cd495e316fd653070a3fb95c6 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 19 Mar 2017 23:54:54 +0100 Subject: [PATCH] SiteConfig * always place newly added php-configurations in the misc-category --- includes/ajaxHandler/admin.class.php | 2 +- setup/tools/clisetup/siteconfig.func.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/ajaxHandler/admin.class.php b/includes/ajaxHandler/admin.class.php index 32087304..223af1a5 100644 --- a/includes/ajaxHandler/admin.class.php +++ b/includes/ajaxHandler/admin.class.php @@ -300,7 +300,7 @@ class AjaxAdmin extends AjaxHandler if (DB::Aowow()->selectCell('SELECT 1 FROM ?_config WHERE `flags` & ?d AND `key` = ?', CON_FLAG_PHP, $key)) return 'this configuration option is already in use'; - DB::Aowow()->query('INSERT IGNORE INTO ?_config (`key`, `value`, `flags`) VALUES (?, ?, ?d)', $key, $val, CON_FLAG_TYPE_STRING | CON_FLAG_PHP); + DB::Aowow()->query('INSERT IGNORE INTO ?_config (`key`, `value`, `cat`, `flags`) VALUES (?, ?, 0, ?d)', $key, $val, CON_FLAG_TYPE_STRING | CON_FLAG_PHP); return ''; } diff --git a/setup/tools/clisetup/siteconfig.func.php b/setup/tools/clisetup/siteconfig.func.php index e7919aaf..eee87ec7 100644 --- a/setup/tools/clisetup/siteconfig.func.php +++ b/setup/tools/clisetup/siteconfig.func.php @@ -142,7 +142,7 @@ function siteconfig() } else { - DB::Aowow()->query('INSERT IGNORE INTO ?_config (`key`, `value`, `flags`) VALUES (?, ?, ?d)', $key, $setting['val'], CON_FLAG_TYPE_STRING | CON_FLAG_PHP); + DB::Aowow()->query('INSERT IGNORE INTO ?_config (`key`, `value`, `cat`, `flags`) VALUES (?, ?, 0, ?d)', $key, $setting['val'], CON_FLAG_TYPE_STRING | CON_FLAG_PHP); CLISetup::log("new php configuration added", CLISetup::LOG_OK); sleep(1); }