Browse Source

Fix the API settings page, update validator, fix sidebar text hover

tags/3.1.0
Mike Koch 2 years ago
parent
commit
f6283a4c13

+ 2
- 2
admin/api_settings.php View File

@@ -3,7 +3,7 @@
define('IN_SCRIPT', 1);
define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_SETTINGS');
define('MFH_PAGE_LAYOUT', 'TOP_AND_SIDE');
define('MFH_PAGE_LAYOUT', 'TOP_ONLY');

// Make sure the install folder is deleted
if (is_dir(HESK_PATH . 'install')) {
@@ -92,7 +92,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<ul class="nav nav-tabs">
<li class="active"><a href="#general" data-toggle="tab"><?php echo $hesklang['tab_1']; ?></a></li>
<li><a href="#user-security" data-toggle="tab"><?php echo $hesklang['user_security']; ?></a></li>
<li><a href="#" target="_blank"><?php echo $hesklang['api_documentation']; ?> <i class="fa fa-external-link"></i></a></li>
<li><a href="https://mods-for-hesk.readme.io/reference" target="_blank"><?php echo $hesklang['api_documentation']; ?> <i class="fa fa-external-link"></i></a></li>
</ul>
<div class="tab-content summaryList tabPadding">
<div class="tab-pane fade in active" id="general">

+ 25
- 0
install/mods-for-hesk/database-validation.php View File

@@ -184,6 +184,21 @@ hesk_dbConnect();
$all_good = $all_good & run_column_check('custom_nav_element_to_text', 'language');
$all_good = $all_good & run_column_check('custom_nav_element_to_text', 'text');
$all_good = $all_good & run_column_check('custom_nav_element_to_text', 'subtext');
$all_good = $all_good & run_setting_check('admin_navbar_background');
$all_good = $all_good & run_setting_check('admin_navbar_background_hover');
$all_good = $all_good & run_setting_check('admin_navbar_text');
$all_good = $all_good & run_setting_check('admin_navbar_text_hover');
$all_good = $all_good & run_setting_check('admin_navbar_brand_background');
$all_good = $all_good & run_setting_check('admin_navbar_brand_background_hover');
$all_good = $all_good & run_setting_check('admin_navbar_brand_text');
$all_good = $all_good & run_setting_check('admin_navbar_brand_text_hover');
$all_good = $all_good & run_setting_check('admin_sidebar_background');
$all_good = $all_good & run_setting_check('admin_sidebar_background_hover');
$all_good = $all_good & run_setting_check('admin_sidebar_text');
$all_good = $all_good & run_setting_check('admin_sidebar_text_hover');
$all_good = $all_good & run_setting_check('admin_sidebar_font_weight');
$all_good = $all_good & run_setting_check('admin_sidebar_header_background');
$all_good = $all_good & run_setting_check('admin_sidebar_header_text');

if ($all_good) {
echo "<script>$('#all-good').show()</script>";
@@ -198,6 +213,16 @@ hesk_dbConnect();
</body>
</html>
<?php
function run_setting_check($setting_name) {
global $hesk_settings;

$all_good = run_check("SELECT 1 FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` WHERE `Key` = '{$setting_name}'");

output_result('<b>Setting Exists</b>: ' . $setting_name, $all_good);

return $all_good !== false;
}

function run_table_check($table_name) {
return run_column_check($table_name, '1');
}

+ 1
- 1
install/mods-for-hesk/sql/installSql.php View File

@@ -1040,7 +1040,7 @@ function execute310Scripts() {
$sidebar = array(
'background' => $light_theme ? '#f9fafc' : '#222d32',
'text' => $light_theme ? '#444' : '#b8c7ce',
'text_hover' => $light_theme ? '#444' : '#b8c7ce',
'text_hover' => $light_theme ? '#444' : '#fff',
'background_hover' => $light_theme ? '#f4f4f5' : '#1e282c',
'font_weight' => $light_theme ? 'bold' : 'normal'
);

Loading…
Cancel
Save