<?php
/***************************************************************************
-Copyright (C) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2004 - 2010 Marcus Campbell
http://scuttle.org/
This program is free software; you can redistribute it and/or modify
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
-require_once('header.inc.php');
+require_once 'header.inc.php';
-$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
-$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
-$userservice = & ServiceFactory :: getServiceInstance('UserService');
+$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
+$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
+$userservice =& ServiceFactory::getServiceInstance('UserService');
// Header variables
$tplVars['subtitle'] = T_('Edit Bookmark');
-$tplVars['loadjs'] = true;
+$tplVars['loadjs'] = TRUE;
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);
+ $tplVars['error'] = sprintf(T_('Bookmark with id %s was not found'), $bookmark);
$templateservice->loadTemplate('error.404.tpl', $tplVars);
exit();
} else {
$tplVars['referrer'] = $_SERVER['HTTP_REFERER'];
$templateservice->loadTemplate('editbookmark.tpl', $tplVars);
}
-?>