]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Add settings history only when they're updated 858/head
authorArthurHoaro <arthur@hoa.ro>
Sun, 7 May 2017 14:58:15 +0000 (16:58 +0200)
committerArthurHoaro <arthur@hoa.ro>
Sun, 7 May 2017 15:11:25 +0000 (17:11 +0200)
index.php

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