Merge pull request #1209 from ArthurHoaro/hotfix/history-delete

History: fix a bug on bulk deletion where only one deletion were regi…
This commit is contained in:
ArthurHoaro 2018-08-13 13:24:01 +02:00 committed by GitHub
commit f28b73b21f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1236,10 +1236,10 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
$id = (int) escape($id); $id = (int) escape($id);
$link = $LINKSDB[$id]; $link = $LINKSDB[$id];
$pluginManager->executeHooks('delete_link', $link); $pluginManager->executeHooks('delete_link', $link);
$history->deleteLink($link);
unset($LINKSDB[$id]); unset($LINKSDB[$id]);
} }
$LINKSDB->save($conf->get('resource.page_cache')); // save to disk $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 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; } if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo '<script>self.close();</script>'; exit; }