Redirect to homepage after adding a link via "Add Link" dialog
* Fixes https://github.com/shaarli/Shaarli/issues/115
This commit is contained in:
parent
473f37a2ee
commit
35c2c4db5b
1 changed files with 1 additions and 0 deletions
|
@ -1560,6 +1560,7 @@ function renderPage()
|
|||
if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo '<script>self.close();</script>'; 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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue