From df984f26669e0e3bfd6ede23e5bddfae8fd695ea Mon Sep 17 00:00:00 2001 From: mensonge Date: Tue, 25 Nov 2008 16:58:56 +0000 Subject: 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 --- bookmarkcommondescriptionedit.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bookmarkcommondescriptionedit.php') 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']); -- cgit v1.2.3