aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-02-27 18:24:07 +0100
committerSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-02-27 18:24:07 +0100
commitb342b2a4c70e4771845a68426ac15639ca74292e (patch)
tree0dd8e4a38599c473c37c4a0de7bc199685aef2b2 /index.php
parentb2877611c329725a961b24fa18114f2fd41873b6 (diff)
downloadShaarli-b342b2a4c70e4771845a68426ac15639ca74292e.tar.gz
Shaarli-b342b2a4c70e4771845a68426ac15639ca74292e.tar.zst
Shaarli-b342b2a4c70e4771845a68426ac15639ca74292e.zip
After clicking save/cancel on a link, scroll to the link itself.
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.php b/index.php
index 0590b2f6..1ac5187b 100644
--- a/index.php
+++ b/index.php
@@ -1437,6 +1437,7 @@ function renderPage()
1437 // If we are called from the bookmarklet, we must close the popup: 1437 // If we are called from the bookmarklet, we must close the popup:
1438 if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo '<script language="JavaScript">self.close();</script>'; exit; } 1438 if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo '<script language="JavaScript">self.close();</script>'; exit; }
1439 $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' ); 1439 $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' );
1440 $returnurl .= '#'.smallHash($linkdate); // Scroll to the link which has been edited.
1440 header('Location: '.$returnurl); // After saving the link, redirect to the page the user was on. 1441 header('Location: '.$returnurl); // After saving the link, redirect to the page the user was on.
1441 exit; 1442 exit;
1442 } 1443 }
@@ -1447,6 +1448,7 @@ function renderPage()
1447 // If we are called from the bookmarklet, we must close the popup; 1448 // If we are called from the bookmarklet, we must close the popup;
1448 if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo '<script language="JavaScript">self.close();</script>'; exit; } 1449 if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo '<script language="JavaScript">self.close();</script>'; exit; }
1449 $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' ); 1450 $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' );
1451 $returnurl .= '#'.smallHash($_POST['lf_linkdate']); // Scroll to the link which has been edited.
1450 header('Location: '.$returnurl); // After canceling, redirect to the page the user was on. 1452 header('Location: '.$returnurl); // After canceling, redirect to the page the user was on.
1451 exit; 1453 exit;
1452 } 1454 }