diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-05-07 16:58:15 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-05-07 17:11:25 +0200 |
commit | b86aeccf6a99a9617c66cded7252a33b1df560cd (patch) | |
tree | f17b8fa91fe8244fed7a913d64ce3220551916ff /index.php | |
parent | 6bc90f50af611a1674ee1118587feddd4f625d44 (diff) | |
download | Shaarli-b86aeccf6a99a9617c66cded7252a33b1df560cd.tar.gz Shaarli-b86aeccf6a99a9617c66cded7252a33b1df560cd.tar.zst Shaarli-b86aeccf6a99a9617c66cded7252a33b1df560cd.zip |
Add settings history only when they're updated
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1161,7 +1161,6 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) | |||
1161 | $PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false)); | 1161 | $PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false)); |
1162 | $PAGE->assign('api_enabled', $conf->get('api.enabled', true)); | 1162 | $PAGE->assign('api_enabled', $conf->get('api.enabled', true)); |
1163 | $PAGE->assign('api_secret', $conf->get('api.secret')); | 1163 | $PAGE->assign('api_secret', $conf->get('api.secret')); |
1164 | $history->updateSettings(); | ||
1165 | $PAGE->renderPage('configure'); | 1164 | $PAGE->renderPage('configure'); |
1166 | exit; | 1165 | exit; |
1167 | } | 1166 | } |
@@ -1572,7 +1571,6 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) | |||
1572 | 1571 | ||
1573 | // Plugin administration form action | 1572 | // Plugin administration form action |
1574 | if ($targetPage == Router::$PAGE_SAVE_PLUGINSADMIN) { | 1573 | if ($targetPage == Router::$PAGE_SAVE_PLUGINSADMIN) { |
1575 | $history->updateSettings(); | ||
1576 | try { | 1574 | try { |
1577 | if (isset($_POST['parameters_form'])) { | 1575 | if (isset($_POST['parameters_form'])) { |
1578 | unset($_POST['parameters_form']); | 1576 | unset($_POST['parameters_form']); |
@@ -1584,6 +1582,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) | |||
1584 | $conf->set('general.enabled_plugins', save_plugin_config($_POST)); | 1582 | $conf->set('general.enabled_plugins', save_plugin_config($_POST)); |
1585 | } | 1583 | } |
1586 | $conf->write(isLoggedIn()); | 1584 | $conf->write(isLoggedIn()); |
1585 | $history->updateSettings(); | ||
1587 | } | 1586 | } |
1588 | catch (Exception $e) { | 1587 | catch (Exception $e) { |
1589 | error_log( | 1588 | error_log( |