From 22465d68dc4a6ebc6a7d2ddb5d21b71e7bd2d80a Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Tue, 1 Sep 2015 10:43:38 -0400 Subject: [PATCH] #327 Some more progress on moving settings to DB --- admin/admin_settings.php | 19 ------------------- admin/admin_settings_save.php | 1 + css/hesk_newStyle.php | 23 +++++++++++------------ download_attachment.php | 2 +- inc/header.inc.php | 2 +- install/mods-for-hesk/modsForHesk.php | 18 ------------------ print.php | 3 ++- 7 files changed, 16 insertions(+), 52 deletions(-) diff --git a/admin/admin_settings.php b/admin/admin_settings.php index d05a2a1b..28c662e1 100644 --- a/admin/admin_settings.php +++ b/admin/admin_settings.php @@ -254,25 +254,6 @@ if ( defined('HESK_DEMO') ) ?> - - - /modsForHesk_settings.inc.php - - - - '.$hesklang['exists'].', '.$hesklang['writable'].''; - } else { - echo ''.$hesklang['exists'].', '.$hesklang['not_writable'].'
'.$hesklang['e_mfh_settings']; - } - ?> - - diff --git a/admin/admin_settings_save.php b/admin/admin_settings_save.php index cd9e186c..569d8819 100644 --- a/admin/admin_settings_save.php +++ b/admin/admin_settings_save.php @@ -504,6 +504,7 @@ foreach ($postArray as $value) { hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` SET `show` = '1' WHERE `id` = '".intval($value)."'"); } +//TODO change this to DB calls // Save the modsForHesk_settings.inc.php file $set['rtl'] = empty($_POST['rtl']) ? 0 : 1; $set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1; diff --git a/css/hesk_newStyle.php b/css/hesk_newStyle.php index 0369b512..f758a48a 100644 --- a/css/hesk_newStyle.php +++ b/css/hesk_newStyle.php @@ -1,21 +1,20 @@ .nu-rtlFloatLeft { diff --git a/download_attachment.php b/download_attachment.php index dab63c42..c91ba3ee 100755 --- a/download_attachment.php +++ b/download_attachment.php @@ -37,11 +37,11 @@ define('HESK_PATH','./'); // 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_session_start(); +$modsForHesk_settings = mfh_getSettings(); // Are we in maintenance mode? (check customers only) if ( empty($SESSION['id']) ) diff --git a/inc/header.inc.php b/inc/header.inc.php index 272e0da1..b5149231 100644 --- a/inc/header.inc.php +++ b/inc/header.inc.php @@ -46,7 +46,7 @@ $modsForHesk_settings = mfh_getSettings(); <?php echo (isset($hesk_settings['tmp_title']) ? $hesk_settings['tmp_title'] : $hesk_settings['hesk_title']); ?> - + diff --git a/install/mods-for-hesk/modsForHesk.php b/install/mods-for-hesk/modsForHesk.php index 9f9e90c8..89725558 100644 --- a/install/mods-for-hesk/modsForHesk.php +++ b/install/mods-for-hesk/modsForHesk.php @@ -65,24 +65,6 @@ hesk_dbConnect(); CREATE, ALTER, DROP Permissions: Please check before continuing!* - - - modsForHesk_settings.inc.php - - - > - Success'; - } else { - echo ' CHMOD to 0666, yours is '.$fileperm; - $allowInstallation = false; - } - ?> - - * Mods for HESK is unable to check database permissions automatically. diff --git a/print.php b/print.php index f3b43b12..a711bafb 100644 --- a/print.php +++ b/print.php @@ -37,17 +37,18 @@ define('HESK_PATH','./'); /* 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_session_start(); + /* Get the tracking ID */ $trackingID = hesk_cleanID() or die("$hesklang[int_error]: $hesklang[no_trackID]"); /* Connect to database */ hesk_dbConnect(); +$modsForHesk_settings = mfh_getSettings(); // Perform additional checks for customers if ( empty($_SESSION['id']) )