From 35c2c4db5b5179e571023ab7fa7d3ecc03c85391 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Wed, 4 Mar 2015 19:09:01 +0100 Subject: Redirect to homepage after adding a link via "Add Link" dialog * Fixes https://github.com/shaarli/Shaarli/issues/115 --- index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/index.php b/index.php index a8326a2b..cda918df 100644 --- a/index.php +++ b/index.php @@ -1560,6 +1560,7 @@ function renderPage() if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo ''; exit; } $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' ); $returnurl .= '#'.smallHash($linkdate); // Scroll to the link which has been edited. + if (strstr($returnurl, "do=addlink")) { $returnurl = '?'; } //if we come from ?do=addlink, set returnurl to homepage instead header('Location: '.$returnurl); // After saving the link, redirect to the page the user was on. exit; } -- cgit v1.2.3