Add settings history only when they're updated

This commit is contained in:
ArthurHoaro 2017-05-07 16:58:15 +02:00
parent 6bc90f50af
commit b86aeccf6a

View file

@ -1161,7 +1161,6 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history)
$PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false)); $PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false));
$PAGE->assign('api_enabled', $conf->get('api.enabled', true)); $PAGE->assign('api_enabled', $conf->get('api.enabled', true));
$PAGE->assign('api_secret', $conf->get('api.secret')); $PAGE->assign('api_secret', $conf->get('api.secret'));
$history->updateSettings();
$PAGE->renderPage('configure'); $PAGE->renderPage('configure');
exit; exit;
} }
@ -1572,7 +1571,6 @@ function($a, $b) { return $a['order'] - $b['order']; }
// Plugin administration form action // Plugin administration form action
if ($targetPage == Router::$PAGE_SAVE_PLUGINSADMIN) { if ($targetPage == Router::$PAGE_SAVE_PLUGINSADMIN) {
$history->updateSettings();
try { try {
if (isset($_POST['parameters_form'])) { if (isset($_POST['parameters_form'])) {
unset($_POST['parameters_form']); unset($_POST['parameters_form']);
@ -1584,6 +1582,7 @@ function($a, $b) { return $a['order'] - $b['order']; }
$conf->set('general.enabled_plugins', save_plugin_config($_POST)); $conf->set('general.enabled_plugins', save_plugin_config($_POST));
} }
$conf->write(isLoggedIn()); $conf->write(isLoggedIn());
$history->updateSettings();
} }
catch (Exception $e) { catch (Exception $e) {
error_log( error_log(