show proper error message when url is invalid
This commit is contained in:
parent
4a3fdcc4dd
commit
c8a5f29677
1 changed files with 5 additions and 2 deletions
|
@ -135,8 +135,11 @@ if ($userservice->isLoggedOn() && POST_SUBMITTED != '') {
|
|||
$templatename = 'editbookmark.tpl';
|
||||
} else {
|
||||
$address = trim(POST_ADDRESS);
|
||||
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
|
||||
if ($bookmarkservice->bookmarkExists($address, $currentUserID)) {
|
||||
$bookmark = $bookmarkservice->getBookmarkByAddress($address);
|
||||
header('Location: '. createURL('edit', $bookmark['bId']));
|
||||
exit();
|
||||
|
|
Loading…
Reference in a new issue