aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/index.php b/index.php
index 0ef33633..b702bd13 100644
--- a/index.php
+++ b/index.php
@@ -1353,6 +1353,25 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
1353 exit; 1353 exit;
1354 } 1354 }
1355 1355
1356 if ($targetPage == Router::$PAGE_PINLINK) {
1357 if (! isset($_GET['id']) || empty($LINKSDB[$_GET['id']])) {
1358 // FIXME! Use a proper error system.
1359 $msg = t('Invalid link ID provided');
1360 echo '<script>alert("'. $msg .'");document.location=\''. index_url($_SERVER) .'\';</script>';
1361 exit;
1362 }
1363 if (! $sessionManager->checkToken($_GET['token'])) {
1364 die('Wrong token.');
1365 }
1366
1367 $link = $LINKSDB[$_GET['id']];
1368 $link['sticky'] = ! $link['sticky'];
1369 $LINKSDB[(int) $_GET['id']] = $link;
1370 $LINKSDB->save($conf->get('resource.page_cache'));
1371 header('Location: '.index_url($_SERVER));
1372 exit;
1373 }
1374
1356 if ($targetPage == Router::$PAGE_EXPORT) { 1375 if ($targetPage == Router::$PAGE_EXPORT) {
1357 // Export links as a Netscape Bookmarks file 1376 // Export links as a Netscape Bookmarks file
1358 1377