X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=7383348e80a575524814bc006ad52a3694840181;hb=fd006c630b64146edc402b68d8503c716f8a55d6;hp=ea7bf4d105eb12d2c397868a9c3f0584852a39f9;hpb=056107ab4eae0a4867cf8d55de77d31f8868b899;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index ea7bf4d1..7383348e 100755 --- a/index.php +++ b/index.php @@ -1439,10 +1439,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; }