summaryrefslogtreecommitdiff
path: root/edit.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-05-19 15:59:55 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-05-19 15:59:55 +0000
commit1eca2d231c79c046a3c122a09bd761fa8f641a6e (patch)
tree7584daebb596d852e1d1a813a90bba5686925de3 /edit.php
parent01c62e34fcd095e583f00a1890e6f311fbcb47dd (diff)
downloadsemanticscuttle-1eca2d231c79c046a3c122a09bd761fa8f641a6e.tar.gz
semanticscuttle-1eca2d231c79c046a3c122a09bd761fa8f641a6e.tar.bz2
Many interface changes: add 'back to the top links', a variable to display more bookmarks for admins...
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@329 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'edit.php')
-rw-r--r--edit.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/edit.php b/edit.php
index 01f2e59..76a977c 100644
--- a/edit.php
+++ b/edit.php
@@ -1,4 +1,5 @@
<?php
+
/***************************************************************************
Copyright (C) 2004 - 2006 Scuttle project
http://sourceforge.net/projects/scuttle/
@@ -39,23 +40,27 @@ isset($_GET['popup']) ? define('GET_POPUP', $_GET['popup']): define('GET_POPUP',
isset($_POST['popup']) ? define('POST_POPUP', $_POST['popup']): define('POST_POPUP', '');
isset($_POST['referrer']) ? define('POST_REFERRER', $_POST['referrer']): define('POST_REFERRER', '');
-
// Header variables
$tplVars['pagetitle'] = T_('Edit Bookmark');
$tplVars['subtitle'] = T_('Edit Bookmark');
$tplVars['loadjs'] = true;
-list ($url, $bookmark) = explode('/', $_SERVER['PATH_INFO']);
+list ($url, $bookmark) = explode('/', $_SERVER['PATH_INFO']);
+
if (!($row = $bookmarkservice->getBookmark(intval($bookmark), true))) {
$tplVars['error'] = sprintf(T_('Bookmark with id %s not was not found'), $bookmark);
$templateservice->loadTemplate('error.404.tpl', $tplVars);
exit();
} else {
+
if (!$bookmarkservice->editAllowed($row)) {
$tplVars['error'] = T_('You are not allowed to edit this bookmark');
$templateservice->loadTemplate('error.500.tpl', $tplVars);
exit();
} else if (POST_SUBMITTED != '') {
+
+
+
if (!POST_TITLE || !POST_ADDRESS) {
$tplVars['error'] = T_('Your bookmark must have a title and an address');
} else {
@@ -66,7 +71,7 @@ if (!($row = $bookmarkservice->getBookmark(intval($bookmark), true))) {
$description = trim(POST_DESCRIPTION);
$privateNote = trim(POST_PRIVATENOTE);
$status = intval(POST_STATUS);
- $tags = trim(POST_TAGS);
+ $tags = trim(POST_TAGS);
if (!$bookmarkservice->updateBookmark($bId, $address, $title, $description, $privateNote, $status, $tags)) {
$tplvars['error'] = T_('Error while saving your bookmark');