diff --git a/inc/common.inc.php b/inc/common.inc.php index 81b9b2b8..e676d214 100644 --- a/inc/common.inc.php +++ b/inc/common.inc.php @@ -1988,7 +1988,7 @@ function mfh_getSettings() { global $hesk_settings; $settings = array(); - $res = hesk_dbQuery("SELECT `Key`, `Value` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` WHERE `Key` <> 'version'"); + $res = hesk_dbQuery("SELECT `Key`, `Value` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` WHERE `Key` <> 'modsForHeskVersion'"); while ($row = hesk_dbFetchAssoc($res)) { $settings[$row['Key']] = $row['Value']; } diff --git a/inc/header.inc.php b/inc/header.inc.php index 14a67eb0..272e0da1 100644 --- a/inc/header.inc.php +++ b/inc/header.inc.php @@ -34,7 +34,11 @@ /* Check if this is a valid include */ if (!defined('IN_SCRIPT')) {die('Invalid attempt');} -require(HESK_PATH . 'modsForHesk_settings.inc.php'); +if (!function_exists('mfh_getSettings')) { + die('Mods for HESK settings are not accessible!'); +} + +$modsForHesk_settings = mfh_getSettings(); ?> diff --git a/index.php b/index.php index b9344982..5469b558 100644 --- a/index.php +++ b/index.php @@ -38,12 +38,12 @@ define('WYSIWYG',1); // Get all the required files and functions require(HESK_PATH . 'hesk_settings.inc.php'); -require(HESK_PATH . 'modsForHesk_settings.inc.php'); require(HESK_PATH . 'inc/common.inc.php'); +hesk_load_database_functions(); +hesk_dbConnect(); // Are we in maintenance mode? hesk_check_maintenance(); -hesk_load_database_functions(); // Are we in "Knowledgebase only" mode? hesk_check_kb_only();