. * --------------------------------------------------------------------- */ include ('../inc/includes.php'); Session::checkRight("config", READ); if (isset($_GET['check_version'])) { Session::addMessageAfterRedirect( Toolbox::checkNewVersionAvailable() ); Html::back(); } $config = new Config(); $_POST['id'] = 1; if (!empty($_POST["update_auth"])) { $config->update($_POST); Html::back(); } if (!empty($_POST["update"])) { $config->update($_POST); Html::redirect(Toolbox::getItemTypeFormURL('Config')); } if (!empty($_GET['reset_opcache'])) { $config->checkGlobal(UPDATE); if (opcache_reset()) { Session::addMessageAfterRedirect(__('Cache reset successful')); } Html::redirect(Toolbox::getItemTypeFormURL('Config')); } if (!empty($_GET['reset_cache'])) { $config->checkGlobal(UPDATE); $cache = isset($_GET['optname']) ? Config::getCache($_GET['optname']) : $GLPI_CACHE; if ($cache->clear()) { Session::addMessageAfterRedirect(__('Cache reset successful')); } Html::redirect(Toolbox::getItemTypeFormURL('Config')); } Html::header(Config::getTypeName(1), $_SERVER['PHP_SELF'], "config", "config"); $config->display([ 'id' => 1, 'formoptions' => "data-track-changes=true" ]); Html::footer();