X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=index.php;h=3be6be9ee7620ae5066f89a310d208d79d39841f;hb=refs%2Fpull%2F368%2Fhead;hp=c430a2006ee63cac8ed3b8ea751b113bdbb1c9c1;hpb=38bedfbbcdd2a40e9f04f5753e0fd6f4fd513c21;p=github%2Fshaarli%2FShaarli.git
diff --git a/index.php b/index.php
index c430a200..3be6be9e 100755
--- a/index.php
+++ b/index.php
@@ -1354,10 +1354,14 @@ function renderPage()
pubsubhub();
// If we are called from the bookmarklet, we must close the popup:
- if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo ''; exit; }
- $returnurl = ( !empty($_POST['returnurl']) ? escape($_POST['returnurl']) : '?' );
- $returnurl .= '#'.smallHash($_POST['lf_linkdate']); // Scroll to the link which has been edited.
+ if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) {
+ echo '';
+ exit;
+ }
+
+ $returnurl = !empty($_POST['returnurl']) ? escape($_POST['returnurl']): '?';
$location = generateLocation($returnurl, $_SERVER['HTTP_HOST'], array('addlink', 'post', 'edit_link'));
+ $location .= '#'.smallHash($_POST['lf_linkdate']); // Scroll to the link which has been edited.
header('Location: '. $location); // After saving the link, redirect to the page the user was on.
exit;
}