aboutsummaryrefslogtreecommitdiff
path: root/www/bookmarks.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-05-12 19:25:03 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-05-12 19:25:03 +0200
commit88d7b9631b444cef28115fb8e0bae736b45e557e (patch)
tree9c676c98dbface055c68df2731f3a7482dae465b /www/bookmarks.php
parentfc093a5fe51d35a2991e549e8836cac15dc2888b (diff)
parentb57c8d4581b05cd70a363cacd37f9ffc7da785d8 (diff)
downloadsemanticscuttle-88d7b9631b444cef28115fb8e0bae736b45e557e.tar.gz
semanticscuttle-88d7b9631b444cef28115fb8e0bae736b45e557e.tar.bz2
Merge branch 'master' into configurable-privacy2
Diffstat (limited to 'www/bookmarks.php')
-rw-r--r--www/bookmarks.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/www/bookmarks.php b/www/bookmarks.php
index 3092004..efc1680 100644
--- a/www/bookmarks.php
+++ b/www/bookmarks.php
@@ -135,8 +135,11 @@ if ($userservice->isLoggedOn() && POST_SUBMITTED != '') {
$templatename = 'editbookmark.tpl';
} else {
$address = trim(POST_ADDRESS);
- // If the bookmark exists already, edit the original
- if ($bookmarkservice->bookmarkExists($address, $currentUserID)) {
+ if (!SemanticScuttle_Model_Bookmark::isValidUrl($address)) {
+ $tplVars['error'] = T_('This bookmark URL may not be added');
+ $templatename = 'editbookmark.tpl';
+ } else if ($bookmarkservice->bookmarkExists($address, $currentUserID)) {
+ // If the bookmark exists already, edit the original
$bookmark = $bookmarkservice->getBookmarkByAddress($address);
header('Location: '. createURL('edit', $bookmark['bId']));
exit();