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
f2391a5793
commit
3e361b0394
1 changed files with 1 additions and 0 deletions
|
@ -1536,6 +1536,7 @@ function renderPage()
|
||||||
if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo '<script language="JavaScript">self.close();</script>'; exit; }
|
if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo '<script language="JavaScript">self.close();</script>'; exit; }
|
||||||
$returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' );
|
$returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' );
|
||||||
$returnurl .= '#'.smallHash($linkdate); // Scroll to the link which has been edited.
|
$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.
|
header('Location: '.$returnurl); // After saving the link, redirect to the page the user was on.
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue