aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/index.php b/index.php
index f2410f71..35e83eb5 100644
--- a/index.php
+++ b/index.php
@@ -1349,6 +1349,14 @@ function renderPage()
1349 header('Location: ?do=login&post='.urlencode($_GET['post']).(!empty($_GET['title'])?'&title='.urlencode($_GET['title']):'').(!empty($_GET['description'])?'&description='.urlencode($_GET['description']):'').(!empty($_GET['source'])?'&source='.urlencode($_GET['source']):'')); // Redirect to login page, then back to post link. 1349 header('Location: ?do=login&post='.urlencode($_GET['post']).(!empty($_GET['title'])?'&title='.urlencode($_GET['title']):'').(!empty($_GET['description'])?'&description='.urlencode($_GET['description']):'').(!empty($_GET['source'])?'&source='.urlencode($_GET['source']):'')); // Redirect to login page, then back to post link.
1350 exit; 1350 exit;
1351 } 1351 }
1352
1353 // Same case as above except that user tried to access ?do=addlink without being logged in
1354 // Note: passing empty parameters makes Shaarli generate default URLs and descriptions.
1355 if (isset($_GET['do']) && $_GET['do'] === 'addlink') {
1356 header('Location: ?do=login&post=');
1357 exit;
1358 }
1359
1352 $PAGE = new pageBuilder; 1360 $PAGE = new pageBuilder;
1353 buildLinkList($PAGE,$LINKSDB); // Compute list of links to display 1361 buildLinkList($PAGE,$LINKSDB); // Compute list of links to display
1354 $PAGE->renderPage('linklist'); 1362 $PAGE->renderPage('linklist');