Big fix: for import local bookmarks like place: or javascript: (firefox 3 case)

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@143 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
mensonge 2008-09-11 14:08:58 +00:00
parent 91ade3298a
commit c8a27226ee

View file

@ -63,6 +63,9 @@ if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['si
if ($bookmarkservice->bookmarkExists($bAddress, $userservice->getCurrentUserId())) {
$tplVars['error'] = T_('You have already submitted this bookmark.');
} else {
// If bookmark is local (like javascript: or place: in Firefox3), do nothing
if(substr($bAddress, 0, 7) == "http://") {
// If bookmark claims to be from the future, set it to be now instead
if (strtotime($bDatetime) > time()) {
$bDatetime = gmdate('Y-m-d H:i:s');
@ -75,6 +78,7 @@ if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['si
}
}
}
}
header('Location: '. createURL('bookmarks', $userinfo[$userservice->getFieldName('username')]));
} else {
$templatename = 'importNetscape.tpl';