X-Git-Url: https://projects.mako.cc/source/scuttle/blobdiff_plain/c20b44263a89d8bf1a78bfa632daaae3cb4f1da2..HEAD:/edit.php?ds=inline diff --git a/edit.php b/edit.php index 028e8ba..0358a4d 100644 --- a/edit.php +++ b/edit.php @@ -1,7 +1,6 @@ getServiceInstance('BookmarkService'); +$templateservice =& $sf->getServiceInstance('TemplateService'); +$userservice =& $sf->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 { @@ -90,4 +91,3 @@ if (!($row = $bookmarkservice->getBookmark(intval($bookmark), true))) { $tplVars['referrer'] = $_SERVER['HTTP_REFERER']; $templateservice->loadTemplate('editbookmark.tpl', $tplVars); } -?>