]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
History: fix a bug on bulk deletion where only one deletion were registred 1209/head
authorArthurHoaro <arthur@hoa.ro>
Mon, 13 Aug 2018 11:18:31 +0000 (13:18 +0200)
committerArthurHoaro <arthur@hoa.ro>
Mon, 13 Aug 2018 11:18:31 +0000 (13:18 +0200)
index.php

index 4b86a3e2c17ece7338ad04646cedee6150bbbd47..8f6ee50affaf45f69c0d169f4b4f36901af5f1ba 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1236,10 +1236,10 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
             $id = (int) escape($id);
             $link = $LINKSDB[$id];
             $pluginManager->executeHooks('delete_link', $link);
+            $history->deleteLink($link);
             unset($LINKSDB[$id]);
         }
         $LINKSDB->save($conf->get('resource.page_cache')); // save to disk
-        $history->deleteLink($link);
 
         // If we are called from the bookmarklet, we must close the popup:
         if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo '<script>self.close();</script>'; exit; }