aboutsummaryrefslogtreecommitdiff
path: root/bookmarkcommondescriptionedit.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-25 16:58:56 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-25 16:58:56 +0000
commitdf984f26669e0e3bfd6ede23e5bddfae8fd695ea (patch)
treefb0203cf452b3ac07db1d2c6c4a47e7380fb51f1 /bookmarkcommondescriptionedit.php
parent111bcdec7568269e88108ace560c35d333f9df1c (diff)
downloadsemanticscuttle-df984f26669e0e3bfd6ede23e5bddfae8fd695ea.tar.gz
semanticscuttle-df984f26669e0e3bfd6ede23e5bddfae8fd695ea.tar.bz2
Interface fix: add an hyperlink from bookmark edition page to collaborative edition of the same bookmark
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@175 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'bookmarkcommondescriptionedit.php')
-rw-r--r--bookmarkcommondescriptionedit.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/bookmarkcommondescriptionedit.php b/bookmarkcommondescriptionedit.php
index 1ac316e..ec7aee2 100644
--- a/bookmarkcommondescriptionedit.php
+++ b/bookmarkcommondescriptionedit.php
@@ -33,8 +33,15 @@ isset($_POST['cancel']) ? define('POST_CANCEL', $_POST['cancel']): define('POST_
isset($_POST['hash']) ? define('POST_HASH', $_POST['hash']): define('POST_HASH', '');
isset($_POST['title']) ? define('POST_TITLE', $_POST['title']): define('POST_TITLE', '');
isset($_POST['description']) ? define('POST_DESCRIPTION', $_POST['description']): define('POST_DESCRIPTION', '');
-isset($_POST['referrer']) ? define('POST_REFERRER', $_POST['referrer']): define('POST_REFERRER', '');
+// prevent cycle between personal and common edit page
+if(!isset($_POST['referrer'])) {
+ define('POST_REFERRER', '');
+} elseif(strpos($_POST['referrer'], ROOT.'edit.php') == 0) {
+ define('POST_REFERRER', createUrl('history', POST_HASH));
+} else {
+ define('POST_REFERRER', $_POST['referrer']);
+}
list ($url, $hash) = explode('/', $_SERVER['PATH_INFO']);