diff options
author | VirtualTam <virtualtam+github@flibidi.net> | 2016-10-21 11:04:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-21 11:04:52 +0200 |
commit | 3d5e0aede31e07f060e3ca470d36374c54d5040c (patch) | |
tree | 77d08b9ea6d45946c21a55b5389cb66ba2e887cd /index.php | |
parent | 954dc2446caade6ccad3ffd1173ef139c1f36ad3 (diff) | |
parent | 735ed4a94e1da5874195ac47c00612043a193edf (diff) | |
download | Shaarli-3d5e0aede31e07f060e3ca470d36374c54d5040c.tar.gz Shaarli-3d5e0aede31e07f060e3ca470d36374c54d5040c.tar.zst Shaarli-3d5e0aede31e07f060e3ca470d36374c54d5040c.zip |
Merge pull request #673 from virtualtam/cleanup/linkdb
LinkDB: code cleanup
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1211,7 +1211,7 @@ function renderPage($conf, $pluginManager) | |||
1211 | $value['tags']=trim(implode(' ',$tags)); | 1211 | $value['tags']=trim(implode(' ',$tags)); |
1212 | $LINKSDB[$key]=$value; | 1212 | $LINKSDB[$key]=$value; |
1213 | } | 1213 | } |
1214 | $LINKSDB->savedb($conf->get('resource.page_cache')); | 1214 | $LINKSDB->save($conf->get('resource.page_cache')); |
1215 | echo '<script>alert("Tag was removed from '.count($linksToAlter).' links.");document.location=\'?\';</script>'; | 1215 | echo '<script>alert("Tag was removed from '.count($linksToAlter).' links.");document.location=\'?\';</script>'; |
1216 | exit; | 1216 | exit; |
1217 | } | 1217 | } |
@@ -1228,7 +1228,7 @@ function renderPage($conf, $pluginManager) | |||
1228 | $value['tags']=trim(implode(' ',$tags)); | 1228 | $value['tags']=trim(implode(' ',$tags)); |
1229 | $LINKSDB[$key]=$value; | 1229 | $LINKSDB[$key]=$value; |
1230 | } | 1230 | } |
1231 | $LINKSDB->savedb($conf->get('resource.page_cache')); // Save to disk. | 1231 | $LINKSDB->save($conf->get('resource.page_cache')); // Save to disk. |
1232 | echo '<script>alert("Tag was renamed in '.count($linksToAlter).' links.");document.location=\'?searchtags='.urlencode($_POST['totag']).'\';</script>'; | 1232 | echo '<script>alert("Tag was renamed in '.count($linksToAlter).' links.");document.location=\'?searchtags='.urlencode($_POST['totag']).'\';</script>'; |
1233 | exit; | 1233 | exit; |
1234 | } | 1234 | } |
@@ -1283,7 +1283,7 @@ function renderPage($conf, $pluginManager) | |||
1283 | $pluginManager->executeHooks('save_link', $link); | 1283 | $pluginManager->executeHooks('save_link', $link); |
1284 | 1284 | ||
1285 | $LINKSDB[$linkdate] = $link; | 1285 | $LINKSDB[$linkdate] = $link; |
1286 | $LINKSDB->savedb($conf->get('resource.page_cache')); | 1286 | $LINKSDB->save($conf->get('resource.page_cache')); |
1287 | pubsubhub($conf); | 1287 | pubsubhub($conf); |
1288 | 1288 | ||
1289 | // If we are called from the bookmarklet, we must close the popup: | 1289 | // If we are called from the bookmarklet, we must close the popup: |
@@ -1325,7 +1325,7 @@ function renderPage($conf, $pluginManager) | |||
1325 | $pluginManager->executeHooks('delete_link', $LINKSDB[$linkdate]); | 1325 | $pluginManager->executeHooks('delete_link', $LINKSDB[$linkdate]); |
1326 | 1326 | ||
1327 | unset($LINKSDB[$linkdate]); | 1327 | unset($LINKSDB[$linkdate]); |
1328 | $LINKSDB->savedb('resource.page_cache'); // save to disk | 1328 | $LINKSDB->save('resource.page_cache'); // save to disk |
1329 | 1329 | ||
1330 | // If we are called from the bookmarklet, we must close the popup: | 1330 | // If we are called from the bookmarklet, we must close the popup: |
1331 | if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo '<script>self.close();</script>'; exit; } | 1331 | if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo '<script>self.close();</script>'; exit; } |