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
This commit is contained in:
parent
ef5105371b
commit
a15fd27e8a
3 changed files with 8 additions and 11 deletions
|
@ -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['description']) ? define('GET_DESCRIPTION', $_GET['description']): define('GET_DESCRIPTION', '');
|
||||||
isset($_GET['privateNote']) ? define('GET_PRIVATENOTE', $_GET['privateNote']): define('GET_PRIVATENOTE', '');
|
isset($_GET['privateNote']) ? define('GET_PRIVATENOTE', $_GET['privateNote']): define('GET_PRIVATENOTE', '');
|
||||||
isset($_GET['tags']) ? define('GET_TAGS', $_GET['tags']): define('GET_TAGS', '');
|
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['title']) ? define('POST_TITLE', $_POST['title']): define('POST_TITLE', '');
|
||||||
isset($_POST['address']) ? define('POST_ADDRESS', $_POST['address']): define('POST_ADDRESS', '');
|
isset($_POST['address']) ? define('POST_ADDRESS', $_POST['address']): define('POST_ADDRESS', '');
|
||||||
|
@ -184,14 +185,10 @@ if ($templatename == 'editbookmark.tpl') {
|
||||||
);
|
);
|
||||||
$tplVars['tags'] = POST_TAGS;
|
$tplVars['tags'] = POST_TAGS;
|
||||||
} else {
|
} else {
|
||||||
$tplVars['row'] = array(
|
$tplVars['row'] = $bookmarkservice->getBookmark($_GET['copyOf'], true);
|
||||||
'bTitle' => stripslashes(GET_TITLE),
|
if(!$currentUser->isAdmin()) {
|
||||||
'bAddress' => stripslashes(GET_ADDRESS),
|
$tplVars['row']['bPrivateNote'] = ''; //only admin can copy private note
|
||||||
'bDescription' => stripslashes(GET_DESCRIPTION),
|
}
|
||||||
'bPrivateNote' => stripslashes(GET_PRIVATENOTE),
|
|
||||||
'tags' => (GET_TAGS ? explode(',', stripslashes(GET_TAGS)) : array()),
|
|
||||||
'bStatus' => 0
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
$title = T_('Add a Bookmark');
|
$title = T_('Add a Bookmark');
|
||||||
$tplVars['referrer'] = $_SERVER['HTTP_REFERER'];
|
$tplVars['referrer'] = $_SERVER['HTTP_REFERER'];
|
||||||
|
|
|
@ -203,7 +203,7 @@ class Bookmark2TagService {
|
||||||
}
|
}
|
||||||
|
|
||||||
function &getTagsForBookmark($bookmarkid) {
|
function &getTagsForBookmark($bookmarkid) {
|
||||||
if (!is_int($bookmarkid)) {
|
if (!is_numeric($bookmarkid)) {
|
||||||
message_die(GENERAL_ERROR, 'Could not get tags (invalid bookmarkid)', '', __LINE__, __FILE__, $query);
|
message_die(GENERAL_ERROR, 'Could not get tags (invalid bookmarkid)', '', __LINE__, __FILE__, $query);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ if($currenttag!= '') {
|
||||||
if ($userservice->isLoggedOn()
|
if ($userservice->isLoggedOn()
|
||||||
&& ($currentUser->getId() != $row['uId'])
|
&& ($currentUser->getId() != $row['uId'])
|
||||||
&& !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())) {
|
&& !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())) {
|
||||||
$copy .= ' - <a href="'. createURL('bookmarks', $currentUser->getUsername() .'?action=add&address='. urlencode($row['bAddress']) .'&title='. urlencode($row['bTitle'])). '&description='.urlencode($row['bDescription']). '&tags='.$tagsForCopy .'">'. T_('Copy') .'</a>';
|
$copy .= ' - <a href="'. createURL('bookmarks', $currentUser->getUsername() .'?action=add&copyOf='. $row['bId']) .'">'. T_('Copy') .'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nofollow option
|
// Nofollow option
|
||||||
|
|
Loading…
Reference in a new issue