diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1084,7 +1084,8 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, | |||
1084 | die(t('Wrong token.')); | 1084 | die(t('Wrong token.')); |
1085 | } | 1085 | } |
1086 | 1086 | ||
1087 | $alteredLinks = $LINKSDB->renameTag(escape($_POST['fromtag']), escape($_POST['totag'])); | 1087 | $toTag = isset($_POST['totag']) ? escape($_POST['totag']) : null; |
1088 | $alteredLinks = $LINKSDB->renameTag(escape($_POST['fromtag']), $toTag); | ||
1088 | $LINKSDB->save($conf->get('resource.page_cache')); | 1089 | $LINKSDB->save($conf->get('resource.page_cache')); |
1089 | foreach ($alteredLinks as $link) { | 1090 | foreach ($alteredLinks as $link) { |
1090 | $history->updateLink($link); | 1091 | $history->updateLink($link); |
@@ -1236,10 +1237,10 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, | |||
1236 | $id = (int) escape($id); | 1237 | $id = (int) escape($id); |
1237 | $link = $LINKSDB[$id]; | 1238 | $link = $LINKSDB[$id]; |
1238 | $pluginManager->executeHooks('delete_link', $link); | 1239 | $pluginManager->executeHooks('delete_link', $link); |
1240 | $history->deleteLink($link); | ||
1239 | unset($LINKSDB[$id]); | 1241 | unset($LINKSDB[$id]); |
1240 | } | 1242 | } |
1241 | $LINKSDB->save($conf->get('resource.page_cache')); // save to disk | 1243 | $LINKSDB->save($conf->get('resource.page_cache')); // save to disk |
1242 | $history->deleteLink($link); | ||
1243 | 1244 | ||
1244 | // If we are called from the bookmarklet, we must close the popup: | 1245 | // If we are called from the bookmarklet, we must close the popup: |
1245 | if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo '<script>self.close();</script>'; exit; } | 1246 | if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo '<script>self.close();</script>'; exit; } |