summaryrefslogtreecommitdiff
path: root/bookmarks.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-02-16 09:49:51 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-02-16 09:49:51 +0000
commita15fd27e8adc18367d358c06e39343e0c34ed1e0 (patch)
tree4f48923f8725a4d8634379386a3a7610bf8d11a4 /bookmarks.php
parentef5105371b7cf7d1a3b56d7007c5227dd3f1c8c9 (diff)
downloadsemanticscuttle-a15fd27e8adc18367d358c06e39343e0c34ed1e0.tar.gz
semanticscuttle-a15fd27e8adc18367d358c06e39343e0c34ed1e0.tar.bz2
Bug fix: correct bug in copy (for some servers configuration)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@275 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'bookmarks.php')
-rw-r--r--bookmarks.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/bookmarks.php b/bookmarks.php
index a0f15e2..43c2275 100644
--- a/bookmarks.php
+++ b/bookmarks.php
@@ -34,6 +34,7 @@ isset($_GET['address']) ? define('GET_ADDRESS', $_GET['address']): define('GET_A
isset($_GET['description']) ? define('GET_DESCRIPTION', $_GET['description']): define('GET_DESCRIPTION', '');
isset($_GET['privateNote']) ? define('GET_PRIVATENOTE', $_GET['privateNote']): define('GET_PRIVATENOTE', '');
isset($_GET['tags']) ? define('GET_TAGS', $_GET['tags']): define('GET_TAGS', '');
+isset($_GET['copyOf']) ? define('GET_COPYOF', $_GET['copyOf']): define('GET_COPYOF', '');
isset($_POST['title']) ? define('POST_TITLE', $_POST['title']): define('POST_TITLE', '');
isset($_POST['address']) ? define('POST_ADDRESS', $_POST['address']): define('POST_ADDRESS', '');
@@ -183,15 +184,11 @@ if ($templatename == 'editbookmark.tpl') {
'bStatus' => 0,
);
$tplVars['tags'] = POST_TAGS;
- } else {
- $tplVars['row'] = array(
- 'bTitle' => stripslashes(GET_TITLE),
- 'bAddress' => stripslashes(GET_ADDRESS),
- 'bDescription' => stripslashes(GET_DESCRIPTION),
- 'bPrivateNote' => stripslashes(GET_PRIVATENOTE),
- 'tags' => (GET_TAGS ? explode(',', stripslashes(GET_TAGS)) : array()),
- 'bStatus' => 0
- );
+ } else {
+ $tplVars['row'] = $bookmarkservice->getBookmark($_GET['copyOf'], true);
+ if(!$currentUser->isAdmin()) {
+ $tplVars['row']['bPrivateNote'] = ''; //only admin can copy private note
+ }
}
$title = T_('Add a Bookmark');
$tplVars['referrer'] = $_SERVER['HTTP_REFERER'];