diff --git a/admin/api_settings.php b/admin/api_settings.php index edd7c504..6cb8b676 100644 --- a/admin/api_settings.php +++ b/admin/api_settings.php @@ -39,11 +39,7 @@ if (is_dir(HESK_PATH . 'install')) { // Get all the required files and functions require(HESK_PATH . 'hesk_settings.inc.php'); - -// Save the default language for the settings page before choosing user's preferred one -$hesk_settings['language_default'] = $hesk_settings['language']; require(HESK_PATH . 'inc/common.inc.php'); -$hesk_settings['language'] = $hesk_settings['language_default']; require(HESK_PATH . 'inc/admin_functions.inc.php'); hesk_load_database_functions(); @@ -54,9 +50,13 @@ hesk_isLoggedIn(); // Check permissions for this feature hesk_checkPermission('can_man_settings'); +$modsForHesk_settings = mfh_getSettings(); + +define('EXTRA_JS', ''); // Print header require_once(HESK_PATH . 'inc/headerAdmin.inc.php'); + // Print main manage users page require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); ?> @@ -80,8 +80,13 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); External API - - Enabled + + + Disabled + Enabled @@ -93,7 +98,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
@@ -106,14 +111,26 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); data-content="Enable or Disable the Public REST API.">
-
-
+ + + + + +
diff --git a/css/mods-for-hesk.css b/css/mods-for-hesk.css index 8e62d840..fa9537dc 100644 --- a/css/mods-for-hesk.css +++ b/css/mods-for-hesk.css @@ -197,10 +197,6 @@ div.setupButtons { padding: 10px 0; } -.hide { - display: none; -} - .font-size-90 { font-size: .9em !important; } diff --git a/inc/common.inc.php b/inc/common.inc.php index 963fe2f2..2e4d4cbe 100644 --- a/inc/common.inc.php +++ b/inc/common.inc.php @@ -167,6 +167,18 @@ function hesk_load_api_database_functions() } // END hesk_load_database_functions() +function hesk_load_internal_api_database_functions() +{ + require(HESK_PATH . 'internal-api/core/json_error.php'); + // Preferrably use the MySQLi functions + if (function_exists('mysqli_connect')) { + require(HESK_PATH . 'internal-api/core/database_mysqli.inc.php'); + } // Default to MySQL + else { + require(HESK_PATH . 'internal-api/core/database.inc.php'); + } +} // END hesk_load_database_functions() + function hesk_unlink($file, $older_than = 0) { return (is_file($file) && (!$older_than || (time() - filectime($file)) > $older_than) && @unlink($file)) ? true : false; diff --git a/inc/headerAdmin.inc.php b/inc/headerAdmin.inc.php index f1504330..35698c70 100644 --- a/inc/headerAdmin.inc.php +++ b/inc/headerAdmin.inc.php @@ -89,6 +89,12 @@ $modsForHesk_settings = mfh_getSettings(); + +