]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
Bump version to v0.9.0
[github/shaarli/Shaarli.git] / index.php
index fb7318d918fc567726ab77e58aede00a6574cf1c..ab1e30da9154c91c610014a93eafff882a7a01d9 100644 (file)
--- a/index.php
+++ b/index.php
@@ -728,7 +728,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history)
         die($e->getMessage());
     }
 
-    $PAGE = new PageBuilder($conf);
+    $PAGE = new PageBuilder($conf, $LINKSDB);
     $PAGE->assign('linkcount', count($LINKSDB));
     $PAGE->assign('privateLinkcount', count_private($LINKSDB));
     $PAGE->assign('plugin_errors', $pluginManager->getErrors());
@@ -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;
         }
@@ -1171,7 +1170,6 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history)
     if ($targetPage == Router::$PAGE_CHANGETAG)
     {
         if (empty($_POST['fromtag']) || (empty($_POST['totag']) && isset($_POST['renametag']))) {
-            $PAGE->assign('tags', $LINKSDB->allTags());
             $PAGE->renderPage('changetag');
             exit;
         }
@@ -1572,7 +1570,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 +1581,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(
@@ -1701,7 +1699,6 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
         'visibility' => ! empty($_SESSION['privateonly']) ? 'private' : '',
         'redirector' => $conf->get('redirector.url'),  // Optional redirector URL.
         'links' => $linkDisp,
-        'tags' => $LINKSDB->allTags(),
     );
 
     // If there is only a single link, we change on-the-fly the title of the page.