#327 Some more progress on moving settings to DB
This commit is contained in:
parent
6d9362ed4d
commit
22465d68dc
@ -254,25 +254,6 @@ if ( defined('HESK_DEMO') )
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="text-right">
|
|
||||||
/modsForHesk_settings.inc.php
|
|
||||||
</td>
|
|
||||||
<?php
|
|
||||||
$modsForHeskIsWritable = is_writable(HESK_PATH . 'modsForHesk_settings.inc.php');
|
|
||||||
$cellClass = $modsForHeskIsWritable ? 'success' : 'danger';
|
|
||||||
?>
|
|
||||||
<td style="padding-left: 10px" class="<?php echo $cellClass; ?>">
|
|
||||||
<?php
|
|
||||||
if ($modsForHeskIsWritable) {
|
|
||||||
$enable_save_settings=1;
|
|
||||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="success">'.$hesklang['writable'].'</span>';
|
|
||||||
} else {
|
|
||||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br />'.$hesklang['e_mfh_settings'];
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -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)."'");
|
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
|
// Save the modsForHesk_settings.inc.php file
|
||||||
$set['rtl'] = empty($_POST['rtl']) ? 0 : 1;
|
$set['rtl'] = empty($_POST['rtl']) ? 0 : 1;
|
||||||
$set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1;
|
$set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1;
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
header("Content-type: text/css; charset: UTF-8");
|
header("Content-type: text/css; charset: UTF-8");
|
||||||
require_once('../modsForHesk_settings.inc.php');
|
|
||||||
|
|
||||||
$navbarBackgroundColor = $modsForHesk_settings['navbarBackgroundColor'];
|
$navbarBackgroundColor = '#414a5c';
|
||||||
$navbarBrandColor = $modsForHesk_settings['navbarBrandColor'];
|
$navbarBrandColor = '#d4dee7';
|
||||||
$navbarBrandHoverColor = $modsForHesk_settings['navbarBrandHoverColor'];
|
$navbarBrandHoverColor = '#ffffff';
|
||||||
|
|
||||||
$navbarItemTextColor = $modsForHesk_settings['navbarItemTextColor'];
|
$navbarItemTextColor = '#d4dee7';
|
||||||
$navbarItemTextHoverColor = $modsForHesk_settings['navbarItemTextHoverColor'];
|
$navbarItemTextHoverColor = '#ffffff';
|
||||||
$navbarItemTextSelectedColor = $modsForHesk_settings['navbarItemTextSelectedColor'];
|
$navbarItemTextSelectedColor = '#ffffff';
|
||||||
$navbarItemSelectedBackgroundColor = $modsForHesk_settings['navbarItemSelectedBackgroundColor'];
|
$navbarItemSelectedBackgroundColor = '#2d3646';
|
||||||
|
|
||||||
$dropdownItemTextColor = $modsForHesk_settings['dropdownItemTextColor'];
|
$dropdownItemTextColor = '#333333';
|
||||||
$dropdownItemTextHoverColor = $modsForHesk_settings['dropdownItemTextHoverColor'];
|
$dropdownItemTextHoverColor = '#262626';
|
||||||
$dropdownItemTextHoverBackgroundColor = $modsForHesk_settings['dropdownItemTextHoverBackgroundColor'];
|
$dropdownItemTextHoverBackgroundColor = '#f5f5f5';
|
||||||
|
|
||||||
$questionMarkColor = $modsForHesk_settings['questionMarkColor'];
|
$questionMarkColor = '#000000';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
.nu-rtlFloatLeft {
|
.nu-rtlFloatLeft {
|
||||||
|
@ -37,11 +37,11 @@ define('HESK_PATH','./');
|
|||||||
|
|
||||||
// Get all the required files and functions
|
// Get all the required files and functions
|
||||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||||
require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
|
||||||
require(HESK_PATH . 'inc/common.inc.php');
|
require(HESK_PATH . 'inc/common.inc.php');
|
||||||
hesk_load_database_functions();
|
hesk_load_database_functions();
|
||||||
|
|
||||||
hesk_session_start();
|
hesk_session_start();
|
||||||
|
$modsForHesk_settings = mfh_getSettings();
|
||||||
|
|
||||||
// Are we in maintenance mode? (check customers only)
|
// Are we in maintenance mode? (check customers only)
|
||||||
if ( empty($SESSION['id']) )
|
if ( empty($SESSION['id']) )
|
||||||
|
@ -46,7 +46,7 @@ $modsForHesk_settings = mfh_getSettings();
|
|||||||
<title><?php echo (isset($hesk_settings['tmp_title']) ? $hesk_settings['tmp_title'] : $hesk_settings['hesk_title']); ?></title>
|
<title><?php echo (isset($hesk_settings['tmp_title']) ? $hesk_settings['tmp_title'] : $hesk_settings['hesk_title']); ?></title>
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=<?php echo $hesklang['ENCODING']; ?>" />
|
<meta http-equiv="Content-Type" content="text/html;charset=<?php echo $hesklang['ENCODING']; ?>" />
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||||
<meta name="theme-color" content="<?php echo $modsForHesk_settings['navbarBackgroundColor']; ?>">
|
<meta name="theme-color" content="<?php echo '#414a5c'; ?>">
|
||||||
<?php if ($modsForHesk_settings['rtl']) { ?>
|
<?php if ($modsForHesk_settings['rtl']) { ?>
|
||||||
<link href="<?php echo HESK_PATH; ?>hesk_style_RTL.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
<link href="<?php echo HESK_PATH; ?>hesk_style_RTL.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
@ -65,24 +65,6 @@ hesk_dbConnect();
|
|||||||
<td>CREATE, ALTER, DROP Permissions:</td>
|
<td>CREATE, ALTER, DROP Permissions:</td>
|
||||||
<td class="warning"><i class="fa fa-exclamation-triangle"></i> Please check before continuing!*</td>
|
<td class="warning"><i class="fa fa-exclamation-triangle"></i> Please check before continuing!*</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
modsForHesk_settings.inc.php
|
|
||||||
</td>
|
|
||||||
<?php
|
|
||||||
$fileperm = substr(sprintf('%o', fileperms(HESK_PATH.'modsForHesk_settings.inc.php')), -4);
|
|
||||||
$class = (intval($fileperm) < 666) ? 'class="danger"' : 'class="success"';
|
|
||||||
?>
|
|
||||||
<td <?php echo $class; ?>>
|
|
||||||
<?php if ($class == 'class="success"') {
|
|
||||||
echo '<i class="fa fa-check-circle"></i> Success';
|
|
||||||
} else {
|
|
||||||
echo '<i class="fa fa-times-circle"></i> CHMOD to 0666, yours is '.$fileperm;
|
|
||||||
$allowInstallation = false;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
* Mods for HESK is unable to check database permissions automatically.
|
* Mods for HESK is unable to check database permissions automatically.
|
||||||
|
@ -37,17 +37,18 @@ define('HESK_PATH','./');
|
|||||||
|
|
||||||
/* Get all the required files and functions */
|
/* Get all the required files and functions */
|
||||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||||
require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
|
||||||
require(HESK_PATH . 'inc/common.inc.php');
|
require(HESK_PATH . 'inc/common.inc.php');
|
||||||
hesk_load_database_functions();
|
hesk_load_database_functions();
|
||||||
|
|
||||||
hesk_session_start();
|
hesk_session_start();
|
||||||
|
|
||||||
|
|
||||||
/* Get the tracking ID */
|
/* Get the tracking ID */
|
||||||
$trackingID = hesk_cleanID() or die("$hesklang[int_error]: $hesklang[no_trackID]");
|
$trackingID = hesk_cleanID() or die("$hesklang[int_error]: $hesklang[no_trackID]");
|
||||||
|
|
||||||
/* Connect to database */
|
/* Connect to database */
|
||||||
hesk_dbConnect();
|
hesk_dbConnect();
|
||||||
|
$modsForHesk_settings = mfh_getSettings();
|
||||||
|
|
||||||
// Perform additional checks for customers
|
// Perform additional checks for customers
|
||||||
if ( empty($_SESSION['id']) )
|
if ( empty($_SESSION['id']) )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user