aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authornodiscc <nodiscc@gmail.com>2014-08-19 21:52:36 +0200
committernodiscc <nodiscc@gmail.com>2014-08-19 21:52:36 +0200
commite0cbb078723ad521496c53ff84a9cd29d9dd327a (patch)
tree312eb143361c56baea58e1e9ccf3ed22b107dba5 /index.php
parentabc98ab39d582dbe9d029f91c57abea783bf6892 (diff)
parenta1795ddcf3d1dcef0ca213a5bfb75b8237dfb646 (diff)
downloadShaarli-e0cbb078723ad521496c53ff84a9cd29d9dd327a.tar.gz
Shaarli-e0cbb078723ad521496c53ff84a9cd29d9dd327a.tar.zst
Shaarli-e0cbb078723ad521496c53ff84a9cd29d9dd327a.zip
Merge pull request #19 from nodiscc/master
bookmarklet: use selected text as description when adding a new link
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/index.php b/index.php
index b6d4d2d7..b594287c 100644
--- a/index.php
+++ b/index.php
@@ -415,7 +415,7 @@ if (isset($_POST['login']))
415 session_regenerate_id(true); 415 session_regenerate_id(true);
416 } 416 }
417 // Optional redirect after login: 417 // Optional redirect after login:
418 if (isset($_GET['post'])) { header('Location: ?post='.urlencode($_GET['post']).(!empty($_GET['title'])?'&title='.urlencode($_GET['title']):'').(!empty($_GET['source'])?'&source='.urlencode($_GET['source']):'')); exit; } 418 if (isset($_GET['post'])) { header('Location: ?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']):'')); exit; }
419 if (isset($_POST['returnurl'])) 419 if (isset($_POST['returnurl']))
420 { 420 {
421 if (endsWith($_POST['returnurl'],'?do=login')) { header('Location: ?'); exit; } // Prevent loops over login screen. 421 if (endsWith($_POST['returnurl'],'?do=login')) { header('Location: ?'); exit; } // Prevent loops over login screen.
@@ -427,7 +427,7 @@ if (isset($_POST['login']))
427 { 427 {
428 ban_loginFailed(); 428 ban_loginFailed();
429 $redir = ''; 429 $redir = '';
430 if (isset($_GET['post'])) { $redir = '&post='.urlencode($_GET['post']).(!empty($_GET['title'])?'&title='.urlencode($_GET['title']):'').(!empty($_GET['source'])?'&source='.urlencode($_GET['source']):''); } 430 if (isset($_GET['post'])) { $redir = '&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']):''); }
431 echo '<script language="JavaScript">alert("Wrong login/password.");document.location=\'?do=login'.$redir.'\';</script>'; // Redirect to login screen. 431 echo '<script language="JavaScript">alert("Wrong login/password.");document.location=\'?do=login'.$redir.'\';</script>'; // Redirect to login screen.
432 exit; 432 exit;
433 } 433 }
@@ -1326,7 +1326,7 @@ function renderPage()
1326 // Show login screen, then redirect to ?post=... 1326 // Show login screen, then redirect to ?post=...
1327 if (isset($_GET['post'])) 1327 if (isset($_GET['post']))
1328 { 1328 {
1329 header('Location: ?do=login&post='.urlencode($_GET['post']).(!empty($_GET['title'])?'&title='.urlencode($_GET['title']):'').(!empty($_GET['source'])?'&source='.urlencode($_GET['source']):'')); // Redirect to login page, then back to post link. 1329 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.
1330 exit; 1330 exit;
1331 } 1331 }
1332 $PAGE = new pageBuilder; 1332 $PAGE = new pageBuilder;