]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
fix broken CSS file URL introduced in 1f7f8ce067b278a4837364191513d04f7548cef9
[github/shaarli/Shaarli.git] / index.php
index a8326a2b4422baad7ee32ac3b266e3eb3328614c..cda918df82c45a7dd56d90280eb7e8bc6a2e53d3 100644 (file)
--- a/index.php
+++ b/index.php
@@ -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;
     }