- Enforce minimum elapsed time on registration form
authorMarcus Campbell <marcus.campbell@gmail.com>
Tue, 21 Dec 2010 08:47:47 +0000 (00:47 -0800)
committerMarcus Campbell <marcus.campbell@gmail.com>
Tue, 21 Dec 2010 08:47:47 +0000 (00:47 -0800)
- Removed redirection after save
- Show most recent page of results on index, rather than most recent day
- Minor code style updates
- Shameless self-aggrandising

Signed-off-by: Marcus Campbell <marcus.campbell@gmail.com>
51 files changed:
about.php
ajaxDelete.php
ajaxGetTitle.php
ajaxIsAvailable.php
alltags.php
api/httpauth.inc.php
api/posts_add.php
api/posts_all.php
api/posts_dates.php
api/posts_delete.php
api/posts_get.php
api/posts_recent.php
api/posts_update.php
api/tags_get.php
api/tags_rename.php
bookmarks.php
config.inc.php.example
debug.inc.php
edit.php
header.inc.php
history.php
import.php
importNetscape.php
index.php
locales/de_DE/LC_MESSAGES/messages.po
locales/dk_DK/LC_MESSAGES/messages.po
locales/en_GB/LC_MESSAGES/messages.po
locales/es_ES/LC_MESSAGES/messages.po
locales/fr_FR/LC_MESSAGES/messages.po
locales/hi_IN/LC_MESSAGES/messages.po
locales/it_IT/LC_MESSAGES/messages.po
locales/ja_JP/LC_MESSAGES/messages.po
locales/lt_LT/LC_MESSAGES/messages.po
locales/nl_NL/LC_MESSAGES/messages.po
locales/pt_BR/LC_MESSAGES/messages.po
locales/zh_CN/LC_MESSAGES/messages.po
login.php
password.php
populartags.php
profile.php
readme.txt
register.php
rss.php
search.inc.php
search.php
tagdelete.php
tagrename.php
tags.php
templates/dynamictags.inc.php
watch.php
watchlist.php

index c089cb97cd22aa312681343d0b599ed7bc23208a..d5b35722f17024abefd125212e930e3c2f21683c 100644 (file)
--- a/about.php
+++ b/about.php
@@ -1,7 +1,7 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2004 - 2010 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
 it under the terms of the GNU General Public License as published by
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 1972a20e3d06060cd4bac722bc4bd86c9c4d2b03..fb9930177cffc3a6b3b753947fef25870635b8df 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2005 - 2010 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2005 - 2010 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
index 14b1f463b517c6f40dd50ed9244a5e5a3f9856eb..81e23293d2baa7931d23121d84d7c300e5c9574c 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2005 - 2010 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2005 - 2010 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
index 8cd10c0db93e1c7d41b07666ad6100c9271e9bb0..d1a64a3f97b07673a3678ae38ba3eecbb8b575cf 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2006 - 2010 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2006 - 2010 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
index 1b0476f5b704ec9e04fd1ab74491bf94b40d4c6d..331ac592a4e21def873425dd115f66c1167651d6 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?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
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,13 +18,14 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once 'header.inc.php';
+
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
-$tagservice =& ServiceFactory::getServiceInstance('TagService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$tagservice      =& ServiceFactory::getServiceInstance('TagService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
+$cacheservice    =& ServiceFactory::getServiceInstance('CacheService');
 
 
-list($url, $user) = explode('/', $_SERVER['PATH_INFO']);
+@list($url, $user) = explode('/', $_SERVER['PATH_INFO']);
 if (!$user) {
     header('Location: '. createURL('populartags'));
     exit;
 if (!$user) {
     header('Location: '. createURL('populartags'));
     exit;
index bc265824fd72f6903aaf8453eb06bd330735c50c..79191cf8ca923ebd3ec8d450e5a055ba3b87ac5d 100644 (file)
@@ -5,7 +5,7 @@
 function authenticate() {
     header('WWW-Authenticate: Basic realm="del.icio.us API"');
     header('HTTP/1.0 401 Unauthorized');
 function authenticate() {
     header('WWW-Authenticate: Basic realm="del.icio.us API"');
     header('HTTP/1.0 401 Unauthorized');
-    die("Use of the API calls requires authentication.");
+    die(T_('Use of the API calls requires authentication.'));
 }
 
 if (!isset($_SERVER['PHP_AUTH_USER'])) {
 }
 
 if (!isset($_SERVER['PHP_AUTH_USER'])) {
index 77c3288179bd02a029ee89276ea385c26d0f2c89..f9e060e5806b87b728470e1065bde98c7354dfe4 100644 (file)
 // - No support for 'replace' variable
 
 // Force HTTP authentication
 // - No support for 'replace' variable
 
 // Force HTTP authentication
-require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once 'httpauth.inc.php';
+require_once '../header.inc.php';
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
 
 // Get all the bookmark's passed-in information
 if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != ''))
 
 // Get all the bookmark's passed-in information
 if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != ''))
@@ -67,17 +67,16 @@ if (isset($_REQUEST['status'])) {
 
 // Error out if there's no address or description
 if (is_null($url) || is_null($description)) {
 
 // Error out if there's no address or description
 if (is_null($url) || is_null($description)) {
-    $added = false;
+    $added = FALSE;
 } else {
 // We're good with info; now insert it!
     if ($bookmarkservice->bookmarkExists($url, $userservice->getCurrentUserId()))
 } else {
 // We're good with info; now insert it!
     if ($bookmarkservice->bookmarkExists($url, $userservice->getCurrentUserId()))
-        $added = false;
+        $added = FALSE;
     else
     else
-        $added = $bookmarkservice->addBookmark($url, $description, $extended, $status, $tags, $dt, true);
+        $added = $bookmarkservice->addBookmark($url, $description, $extended, $status, $tags, $dt, TRUE);
 }
 
 // Set up the XML file and output the result.
 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<result code="'. ($added ? 'done' : 'something went wrong') .'" />';
 }
 
 // Set up the XML file and output the result.
 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<result code="'. ($added ? 'done' : 'something went wrong') .'" />';
-?>
\ No newline at end of file
index 03026c4234d271ed7e48b997388ba38958260d14..4f05d39e94e7f66069000d45a5fd60ca39395994 100644 (file)
@@ -5,11 +5,11 @@
 // - doesn't include the filtered tag as an attribute on the root element (we do)
 
 // Force HTTP authentication first!
 // - doesn't include the filtered tag as an attribute on the root element (we do)
 
 // Force HTTP authentication first!
-require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once 'httpauth.inc.php';
+require_once '../header.inc.php';
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
 
 // Check to see if a tag was specified.
 if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
 
 // Check to see if a tag was specified.
 if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
@@ -47,4 +47,3 @@ foreach($bookmarks['bookmarks'] as $row) {
 }
 
 echo '</posts>';
 }
 
 echo '</posts>';
-?>
\ No newline at end of file
index 70987564e9044ea1a6e23ce63b32192da27995a0..672a31227f38154393e7d911df3ce80337b29db6 100644 (file)
@@ -3,11 +3,11 @@
 // by tag).
 
 // Force HTTP authentication first!
 // by tag).
 
 // Force HTTP authentication first!
-require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once 'httpauth.inc.php';
+require_once '../header.inc.php';
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
 
 // Check to see if a tag was specified.
 if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
 
 // Check to see if a tag was specified.
 if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
@@ -26,17 +26,18 @@ header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<dates tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentusername, 'xml') ."\">\r\n";
 
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<dates tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentusername, 'xml') ."\">\r\n";
 
+$count    = 0;
 $lastdate = NULL;
 $lastdate = NULL;
-foreach($bookmarks['bookmarks'] as $row) {
+foreach ($bookmarks['bookmarks'] as $row) {
     $thisdate = gmdate('Y-m-d', strtotime($row['bDatetime']));
     if ($thisdate != $lastdate && $lastdate != NULL) {
         echo "\t<date count=\"". $count .'" date="'. $lastdate ."\" />\r\n";
         $count = 1;
     $thisdate = gmdate('Y-m-d', strtotime($row['bDatetime']));
     if ($thisdate != $lastdate && $lastdate != NULL) {
         echo "\t<date count=\"". $count .'" date="'. $lastdate ."\" />\r\n";
         $count = 1;
-    } else {
-        $count = $count + 1;
+    }
+    else {
+        $count++;
     }
     $lastdate = $thisdate;
 }
 
 echo "</dates>";
     }
     $lastdate = $thisdate;
 }
 
 echo "</dates>";
-?>
\ No newline at end of file
index 737a4fb5d90f3bf4244c0b5bc24a6d367f87d8bb..9bf0ce3a43f1c7b4250640fac39175cbc0ab83e4 100644 (file)
@@ -7,27 +7,27 @@
 // - doesn't set the Content-Type to text/xml (we do).
 
 // Force HTTP authentication first!
 // - doesn't set the Content-Type to text/xml (we do).
 
 // Force HTTP authentication first!
-require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once 'httpauth.inc.php';
+require_once '../header.inc.php';
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
 
 // Note that del.icio.us only errors out if no URL was passed in; there's no error on attempting
 // to delete a bookmark you don't have.
 
 // Error out if there's no address
 if (is_null($_REQUEST['url'])) {
 
 // Note that del.icio.us only errors out if no URL was passed in; there's no error on attempting
 // to delete a bookmark you don't have.
 
 // Error out if there's no address
 if (is_null($_REQUEST['url'])) {
-    $deleted = false;
-} else {
+    $deleted = FALSE;
+}
+else {
     $bookmark = $bookmarkservice->getBookmarkByAddress($_REQUEST['url']);
     $bid = $bookmark['bId'];
     $delete = $bookmarkservice->deleteBookmark($bid);
     $bookmark = $bookmarkservice->getBookmarkByAddress($_REQUEST['url']);
     $bid = $bookmark['bId'];
     $delete = $bookmarkservice->deleteBookmark($bid);
-    $deleted = true;
+    $deleted = TRUE;
 }
 
 // Set up the XML file and output the result.
 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<result code="'. ($deleted ? 'done' : 'something went wrong') .'" />';
 }
 
 // Set up the XML file and output the result.
 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<result code="'. ($deleted ? 'done' : 'something went wrong') .'" />';
-?>
\ No newline at end of file
index 8be067bc97e02b9a872e781839db116a61f334b4..d54f86a4ca06f4cb9d11de46033243a4539a0e72 100644 (file)
 // - Uses today, instead of the last bookmarked date, if no date is specified
 
 // Force HTTP authentication first!
 // - Uses today, instead of the last bookmarked date, if no date is specified
 
 // Force HTTP authentication first!
-require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once 'httpauth.inc.php';
+require_once '../header.inc.php';
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
 
 // Check to see if a tag was specified.
 if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
 
 // Check to see if a tag was specified.
 if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
@@ -40,7 +40,7 @@ header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<posts'. (is_null($dtstart) ? '' : ' dt="'. $dtstart .'"') .' tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentusername, 'xml') ."\">\r\n";
 
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<posts'. (is_null($dtstart) ? '' : ' dt="'. $dtstart .'"') .' tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentusername, 'xml') ."\">\r\n";
 
-foreach($bookmarks['bookmarks'] as $row) {
+foreach ($bookmarks['bookmarks'] as $row) {
     if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
         $description = '';
     else
     if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
         $description = '';
     else
@@ -59,4 +59,3 @@ foreach($bookmarks['bookmarks'] as $row) {
 }
 
 echo '</posts>';
 }
 
 echo '</posts>';
-?>
\ No newline at end of file
index 22fc2bdef04fb60fd6b3a54b48c819cb1f9c8b26..476eecb3133ed89004c6ec3670f89621e593e4ff 100644 (file)
@@ -4,14 +4,14 @@
 
 // Set default and max number of posts
 $countDefault = 15;
 
 // Set default and max number of posts
 $countDefault = 15;
-$countMax = 100;
+$countMax     = 100;
 
 // Force HTTP authentication first!
 
 // Force HTTP authentication first!
-require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once 'httpauth.inc.php';
+require_once '../header.inc.php';
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
 
 // Check to see if a tag was specified.
 if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
 
 // Check to see if a tag was specified.
 if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
@@ -41,7 +41,7 @@ header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<posts tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentusername, 'xml') ."\">\r\n";
 
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<posts tag="'. (is_null($tag) ? '' : filter($tag, 'xml')) .'" user="'. filter($currentusername, 'xml') ."\">\r\n";
 
-foreach($bookmarks['bookmarks'] as $row) {
+foreach ($bookmarks['bookmarks'] as $row) {
     if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
         $description = '';
     else
     if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
         $description = '';
     else
@@ -60,4 +60,3 @@ foreach($bookmarks['bookmarks'] as $row) {
 }
 
 echo '</posts>';
 }
 
 echo '</posts>';
-?>
\ No newline at end of file
index de379d2161f679ad3d59001c705974f772144c24..9e37e1f36e3539289b72c2d6dad6727426e128cd 100644 (file)
@@ -5,22 +5,18 @@
 // - doesn't set the Content-Type to text/xml (we do).
 
 // Force HTTP authentication first!
 // - doesn't set the Content-Type to text/xml (we do).
 
 // Force HTTP authentication first!
-require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once 'httpauth.inc.php';
+require_once '../header.inc.php';
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
 
 // Get the posts relevant to the passed-in variables.
 $bookmarks =& $bookmarkservice->getBookmarks(0, 1, $userservice->getCurrentUserId());
 
 
 // Get the posts relevant to the passed-in variables.
 $bookmarks =& $bookmarkservice->getBookmarks(0, 1, $userservice->getCurrentUserId());
 
-$currentuser = $userservice->getCurrentUser();
-$currentusername = $currentuser[$userservice->getFieldName('username')];
-
 // Set up the XML file and output all the tags.
 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 // Set up the XML file and output all the tags.
 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
-foreach($bookmarks['bookmarks'] as $row) {
+foreach ($bookmarks['bookmarks'] as $row) {
     echo '<update time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) .'" />';
 }
     echo '<update time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) .'" />';
 }
-?>
\ No newline at end of file
index 2584566127d8bce1eac4c470b5763d3103ae4a58..e731873f5b6eec356610e11a7f59f2a036b711d6 100644 (file)
@@ -5,10 +5,10 @@
 // - tags can't have spaces
 
 // Force HTTP authentication first!
 // - tags can't have spaces
 
 // Force HTTP authentication first!
-require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once 'httpauth.inc.php';
+require_once '../header.inc.php';
 
 
-$tagservice =& ServiceFactory::getServiceInstance('TagService');
+$tagservice  =& ServiceFactory::getServiceInstance('TagService');
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 
 // Get the tags relevant to the passed-in variables.
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 
 // Get the tags relevant to the passed-in variables.
@@ -18,8 +18,7 @@ $tags =& $tagservice->getTags($userservice->getCurrentUserId());
 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo "<tags>\r\n";
 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo "<tags>\r\n";
-foreach($tags as $row) {
-    echo "\t<tag count=\"". $row['bCount'] .'" tag="'. filter(convertTag($row['tag'], 'out'), 'xml') ."\" />\r\n";
+foreach ($tags as $row) {
+  echo "\t<tag count=\"". $row['bCount'] .'" tag="'. filter(convertTag($row['tag'], 'out'), 'xml') ."\" />\r\n";
 }
 echo "</tags>";
 }
 echo "</tags>";
-?>
\ No newline at end of file
index 20831e7166b130624e7fc664b44caa78612f68cd..191b3625441e246db15a7bd6ff51e802bf933073 100644 (file)
@@ -5,33 +5,33 @@
 // - oddly, returns an entirely different result (<result></result>) than the other API calls.
 
 // Force HTTP authentication first!
 // - oddly, returns an entirely different result (<result></result>) than the other API calls.
 
 // Force HTTP authentication first!
-require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once 'httpauth.inc.php';
+require_once '../header.inc.php';
 
 
-$tagservice =& ServiceFactory::getServiceInstance('TagService');
+$tagservice  =& ServiceFactory::getServiceInstance('TagService');
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 
 // Get the tag info.
 if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != ''))
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 
 // Get the tag info.
 if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != ''))
-    $old = trim($_REQUEST['old']);
+  $old = trim($_REQUEST['old']);
 else
 else
-    $old = NULL;
+  $old = NULL;
 
 if (isset($_REQUEST['new']) && (trim($_REQUEST['new']) != ''))
 
 if (isset($_REQUEST['new']) && (trim($_REQUEST['new']) != ''))
-    $new = trim($_REQUEST['new']);
+  $new = trim($_REQUEST['new']);
 else
 else
-    $new = NULL;
+  $new = NULL;
 
 if (is_null($old) || is_null($new)) {
 
 if (is_null($old) || is_null($new)) {
-    $renamed = false;
-} else {
-    // Rename the tag.
-    $result = $tagservice->renameTag($userservice->getCurrentUserId(), $old, $new, true);
-    $renamed = $result;
+  $renamed = FALSE;
+}
+else {
+  // Rename the tag.
+  $result = $tagservice->renameTag($userservice->getCurrentUserId(), $old, $new, TRUE);
+  $renamed = $result;
 }
 
 // Set up the XML file and output the result.
 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<result>'. ($renamed ? 'done' : 'something went wrong') .'</result>';
 }
 
 // Set up the XML file and output the result.
 header('Content-Type: text/xml');
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
 echo '<result>'. ($renamed ? 'done' : 'something went wrong') .'</result>';
-?>
index 7dd1f40c3f31e1ec14c5a2eb28b2dab81f1ba39b..d264531c3ebf5199634764bb0f20896b0695774b 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?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
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,12 +18,12 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 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');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
+$cacheservice    =& ServiceFactory::getServiceInstance('CacheService');
 
 $tplVars = array();
 
 
 $tplVars = array();
 
@@ -96,11 +95,13 @@ if ($loggedon && isset($_POST['submitted'])) {
         $templatename = 'editbookmark.tpl';
     } else {
         $address = trim($_POST['address']);
         $templatename = 'editbookmark.tpl';
     } else {
         $address = trim($_POST['address']);
+
         // If the bookmark exists already, edit the original
         if ($bookmarkservice->bookmarkExists($address, $currentUserID)) {
             $bookmark =& $bookmarkservice->getBookmarkByAddress($address);
             header('Location: '. createURL('edit', $bookmark['bId']));
             exit();
         // If the bookmark exists already, edit the original
         if ($bookmarkservice->bookmarkExists($address, $currentUserID)) {
             $bookmark =& $bookmarkservice->getBookmarkByAddress($address);
             header('Location: '. createURL('edit', $bookmark['bId']));
             exit();
+
         // If it's new, save it
         } else {
             $title = trim($_POST['title']);
         // If it's new, save it
         } else {
             $title = trim($_POST['title']);
@@ -113,11 +114,6 @@ if ($loggedon && isset($_POST['submitted'])) {
                     $tplVars['msg'] = '<script type="text/javascript">window.close();</script>';
                 } else {
                     $tplVars['msg'] = T_('Bookmark saved');
                     $tplVars['msg'] = '<script type="text/javascript">window.close();</script>';
                 } else {
                     $tplVars['msg'] = T_('Bookmark saved');
-                    // Redirection option
-                    if ($GLOBALS['useredir']) {
-                        $address = $GLOBALS['url_redir'] . $address;
-                    }
-                    header('Location: '. $address);
                 }
             } else {
                 $tplVars['error'] = T_('There was an error saving your bookmark. Please try again or contact the administrator.');
                 }
             } else {
                 $tplVars['error'] = T_('There was an error saving your bookmark. Please try again or contact the administrator.');
@@ -225,4 +221,3 @@ if ($usecache && $endcache) {
     // Cache output if existing copy has expired
     $cacheservice->End($hash);
 }
     // Cache output if existing copy has expired
     $cacheservice->End($hash);
 }
-?>
index a355bfa350f2dce870ca0cd8bcc0cb6f82c8c1cb..a8c32c9cb264d3b72b246cf94c0caa85bdeb0dd0 100644 (file)
@@ -2,7 +2,7 @@
 ######################################################################
 # SCUTTLE: Online social bookmarks manager
 ######################################################################
 ######################################################################
 # SCUTTLE: Online social bookmarks manager
 ######################################################################
-# Copyright (c) 2005 - 2010 Scuttle project
+# Copyright (c) 2005 - 2010 Marcus Campbell
 # http://scuttle.org/
 #
 # This module is to configure the main options for your site
 # http://scuttle.org/
 #
 # This module is to configure the main options for your site
@@ -92,8 +92,6 @@ $adminemail = 'admin@example.org';
 # filetypes    : An array of bookmark extensions that Scuttle should
 #                add system tags for.
 # reservedusers : An array of usernames that cannot be registered
 # filetypes    : An array of bookmark extensions that Scuttle should
 #                add system tags for.
 # reservedusers : An array of usernames that cannot be registered
-# url_blacklist   : Array of regex patterns. User is banned and existing
-#                     bookmarks are hidden if a match is found.
 # email_whitelist : Array of regex patterns. Used to whitelist addresses that
 #                     may otherwise match the blacklist.
 # email_blacklist : Array of regex patterns. Registration is blocked if a
 # email_whitelist : Array of regex patterns. Used to whitelist addresses that
 #                     may otherwise match the blacklist.
 # email_blacklist : Array of regex patterns. Registration is blocked if a
@@ -104,7 +102,7 @@ $top_include       = 'top.inc.php';
 $bottom_include    = 'bottom.inc.php';
 $shortdate         = 'd-m-Y';
 $longdate          = 'j F Y';
 $bottom_include    = 'bottom.inc.php';
 $shortdate         = 'd-m-Y';
 $longdate          = 'j F Y';
-$nofollow          = true;
+$nofollow          = TRUE;
 $defaultPerPage    = 10;
 $defaultRecentDays = 14;
 $defaultOrderBy    = 'date_desc';
 $defaultPerPage    = 10;
 $defaultRecentDays = 14;
 $defaultOrderBy    = 'date_desc';
@@ -113,12 +111,12 @@ $root              = NULL;
 $cookieprefix      = 'SCUTTLE';
 $tableprefix       = 'sc_';
 $adminemail        = 'admin@example.org';
 $cookieprefix      = 'SCUTTLE';
 $tableprefix       = 'sc_';
 $adminemail        = 'admin@example.org';
-$cleanurls         = false;
+$cleanurls         = FALSE;
 
 
-$usecache          = false;
+$usecache          = FALSE;
 $dir_cache         = dirname(__FILE__) .'/cache/';
 
 $dir_cache         = dirname(__FILE__) .'/cache/';
 
-$useredir          = false;
+$useredir          = FALSE;
 $url_redir         = 'http://www.google.com/url?sa=D&q=';
 
 $filetypes         = array(
 $url_redir         = 'http://www.google.com/url?sa=D&q=';
 
 $filetypes         = array(
index 8bd7f338750d199636ef733173df4172c9e05db2..346140afc8e5eaeb214e4d3ed0d4e0bad3cb2207 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Turn debugging on
 <?php
 // Turn debugging on
-define('SCUTTLE_DEBUG',true);
+define('SCUTTLE_DEBUG', TRUE);
 
 // generic debugging function
 // Sample:
 
 // generic debugging function
 // Sample:
@@ -13,4 +13,3 @@ function pc_debug($file, $line, $message) {
         error_log("SCUTTLE_DEBUG disabled");
     }
 }
         error_log("SCUTTLE_DEBUG disabled");
     }
 }
-?>
\ No newline at end of file
index cca8e470585908f8c0b2e0a2f03904b23128d0e3..bae38e42654c4ad62dc098669380f32255e41201 100644 (file)
--- a/edit.php
+++ b/edit.php
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2004 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,11 +18,11 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 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');
 
 // Header variables
 $tplVars['subtitle'] = T_('Edit Bookmark');
index b8971c366991bdb2f73323c163c37b2d66e7eddf..1002aab5c2f640d274a51a93fc695df332d0ada8 100644 (file)
@@ -2,9 +2,7 @@
 ini_set('display_errors', '1');
 ini_set('mysql.trace_mode', '0');
 
 ini_set('display_errors', '1');
 ini_set('mysql.trace_mode', '0');
 
-error_reporting(E_ALL ^ E_NOTICE);
-
-define('DEBUG', true);
+error_reporting(E_ALL & ~E_WARNING & ~E_NOTICE);
 session_start();
 
 require_once dirname(__FILE__) .'/services/servicefactory.php';
 session_start();
 
 require_once dirname(__FILE__) .'/services/servicefactory.php';
@@ -29,8 +27,8 @@ if (!isset($root)) {
     $root     = $protocol .'://'. $_SERVER['HTTP_HOST'] . $root;
 }
 
     $root     = $protocol .'://'. $_SERVER['HTTP_HOST'] . $root;
 }
 
-// Error codes
 define('GENERAL_MESSAGE',  200);
 define('GENERAL_ERROR',    202);
 define('CRITICAL_MESSAGE', 203);
 define('CRITICAL_ERROR',   204);
 define('GENERAL_MESSAGE',  200);
 define('GENERAL_ERROR',    202);
 define('CRITICAL_MESSAGE', 203);
 define('CRITICAL_ERROR',   204);
+define('DEBUG',            TRUE);
index f27cf092242283037d6d1530bb71d81175459465..8a319723fd71ae81561af3ace03859307d1a9a55 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 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');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
index f45da1369436fbcfb2ce02f549cede1217bb5bda..2af25d0e2a764e886e5bf7eb3a9b72838919ec0c 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2004 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once 'header.inc.php';
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $tplVars = array();
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $tplVars = array();
index b41345bbb2245a362c33ef3e05bb06963f2e8473..97c0a4f14e7aa0697896f5ebe4a4b47f5fb2e177 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2004 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 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');
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
index f89e64ead537ea543dc5f674c64d12a7200e437b..2a9d8aba01f1b95d35c6a520e6596ad760b401b3 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?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
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,18 +18,16 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 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');
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
+$cacheservice    =& ServiceFactory::getServiceInstance('CacheService');
 
 $tplvars = array();
 
 $tplvars = array();
-if (isset($_GET['action'])){
-    if ($_GET['action'] == "logout") {
-        $userservice->logout($path);
-        $tplvars['msg'] = T_('You have now logged out');
-    }
+if (isset($_GET['action']) && 'logout' == $_GET['action']) {
+  $userservice->logout($path);
+  $tplvars['msg'] = T_('You have now logged out');
 }
 
 // Header variables
 }
 
 // Header variables
@@ -53,26 +50,16 @@ if ($usecache) {
 
 // Pagination
 $perpage = getPerPageCount();
 
 // Pagination
 $perpage = getPerPageCount();
-if (isset($_GET['page']) && intval($_GET['page']) > 1) {
-    $page = $_GET['page'];
-    $start = ($page - 1) * $perpage;
-} else {
-    $page = 0;
-    $start = 0;
-}
-
-$dtend = date('Y-m-d H:i:s', strtotime('tomorrow'));
-$dtstart = date('Y-m-d H:i:s', strtotime($dtend .' -'. $defaultRecentDays .' days'));
 
 
-$tplVars['page'] = $page;
-$tplVars['start'] = $start;
+$tplVars['page']     = 0;
+$tplVars['start']    = 0;
 $tplVars['popCount'] = 30;
 $tplVars['sidebar_blocks'] = array('recent');
 $tplVars['range'] = 'all';
 $tplVars['pagetitle'] = T_('Store, share and tag your favourite links');
 $tplVars['subtitle'] = T_('Recent Bookmarks');
 $tplVars['popCount'] = 30;
 $tplVars['sidebar_blocks'] = array('recent');
 $tplVars['range'] = 'all';
 $tplVars['pagetitle'] = T_('Store, share and tag your favourite links');
 $tplVars['subtitle'] = T_('Recent Bookmarks');
-$tplVars['bookmarkCount'] = $start + 1;
-$bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, NULL, NULL, NULL, getSortOrder(), NULL, $dtstart, $dtend);
+$tplVars['bookmarkCount'] = 1;
+$bookmarks =& $bookmarkservice->getBookmarks(0, $perpage, NULL, NULL, NULL, getSortOrder(), NULL);
 $tplVars['total'] = $bookmarks['total'];
 $tplVars['bookmarks'] =& $bookmarks['bookmarks'];
 $tplVars['cat_url'] = createURL('tags', '%2$s');
 $tplVars['total'] = $bookmarks['total'];
 $tplVars['bookmarks'] =& $bookmarks['bookmarks'];
 $tplVars['cat_url'] = createURL('tags', '%2$s');
@@ -84,4 +71,3 @@ if ($usecache) {
     // Cache output if existing copy has expired
     $cacheservice->End($hash);
 }
     // Cache output if existing copy has expired
     $cacheservice->End($hash);
 }
-?>
\ No newline at end of file
index 208f26f292f172a72c438c352dc17aab6f2e6422..1b98a1348fac9b59d0f63d7be80f722ed274ec20 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle de-DE Translation
 # Scuttle de-DE Translation
-# Copyright (C) 2005 - 2006 Scuttle project
+# Copyright (C) 2005 - 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # Ogee <ogee@ogee.de>
 #
 # This file is distributed under the same license as the Scuttle package.
 # Ogee <ogee@ogee.de>
 #
index 3d068511826f7d7acd8f68f9934a5a7d83dafef9..db93765f728b225ef53f4979557e1b6ab974510e 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle dk-DK Translation
 # Scuttle dk-DK Translation
-# Copyright (C) 2006 Scuttle project
+# Copyright (C) 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # Nicki Brøchner <nicki.brochner@gmail.com>
 #
 # This file is distributed under the same license as the Scuttle package.
 # Nicki Brøchner <nicki.brochner@gmail.com>
 #
index 46ea2981d27849b763105fadf10a382be13cd112..446f03426053d482071b2bceff530c3d2d8c9f66 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle en-GB Translation
 # Scuttle en-GB Translation
-# Copyright (C) 2005 - 2006 Scuttle project
+# Copyright (C) 2005 - 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # Marcus Campbell <marcus.campbell@gmail.com>
 #
 # This file is distributed under the same license as the Scuttle package.
 # Marcus Campbell <marcus.campbell@gmail.com>
 #
index 73567fb7b4f647821cbc4fdac305d8c90a366c24..35f6f3ae4a943b001f6f595c22962ea1cc4c57ad 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle es-ES Translation
 # Scuttle es-ES Translation
-# Copyright (C) 2005 - 2006 Scuttle project
+# Copyright (C) 2005 - 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # Francisco Portero <fportero@serbinario.com>
 #
 # This file is distributed under the same license as the Scuttle package.
 # Francisco Portero <fportero@serbinario.com>
 #
index 96572aaecbae880f4a6ac36e76fdd8a138c92888..b71e8b79a0d38227700359cc4251287beade5d9b 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle fr-FR Translation
 # Scuttle fr-FR Translation
-# Copyright (C) 2005 - 2006 Scuttle project
+# Copyright (C) 2005 - 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # <toony.sf@chezouam.net>
 # nitram <nitram@no-log.org>
 # This file is distributed under the same license as the Scuttle package.
 # <toony.sf@chezouam.net>
 # nitram <nitram@no-log.org>
index af6b412ca370a5750082fd20c4bc84325069c342..f60296d4e445569eda3481eb62de0bc6ebde27f0 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle hi-IN Translation
 # Scuttle hi-IN Translation
-# Copyright (C) 2005 - 2006 Scuttle project
+# Copyright (C) 2005 - 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # Debashish Chakrabarty <debashish @ gmail.com>
 # Ravishankar Shrivastava <raviratlami@yahoo.com>
 # This file is distributed under the same license as the Scuttle package.
 # Debashish Chakrabarty <debashish @ gmail.com>
 # Ravishankar Shrivastava <raviratlami@yahoo.com>
index 46d86d3b77f26d3458d1be408397dcf47b6e3991..fa77a568a23ecba0515f4d1c0dd32697765e02ab 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle it-IT Translation
 # Scuttle it-IT Translation
-# Copyright (C) 2005 - 2006 Scuttle project
+# Copyright (C) 2005 - 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # <upcome@gmail.com>
 #
 # This file is distributed under the same license as the Scuttle package.
 # <upcome@gmail.com>
 #
index e59c6aa52e13dca1fafd1960cc4ca7cb3608d2c7..644784ded9d71c62f28038d12c7282faa0a9dc46 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle ja-JP Translation
 # Scuttle ja-JP Translation
-# Copyright (C) 2005 - 2006 Scuttle project
+# Copyright (C) 2005 - 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # Tadashi Jokagi <elf2000@users.sourceforge.net>, 2005-2006.
 #
 # This file is distributed under the same license as the Scuttle package.
 # Tadashi Jokagi <elf2000@users.sourceforge.net>, 2005-2006.
 #
index 90cd169e2848d0d4b80a36e18f66d3aa881ca808..0013c05b0c49e13e97238c2a9e9a21cc69c1c651 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle lt-LT Translation
 # Scuttle lt-LT Translation
-# Copyright (C) 2005 - 2006 Scuttle project
+# Copyright (C) 2005 - 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # Audrius Radzevičius <audrius@gmail.com>
 #
 # This file is distributed under the same license as the Scuttle package.
 # Audrius Radzevičius <audrius@gmail.com>
 #
index 1dd652610abe2de4ccb5c30d2fa3d579dac9ccee..5782028b8df319a9530dce60cd590f98a8e5189c 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle nl-NL Translation
 # Scuttle nl-NL Translation
-# Copyright (C) 2005 - 2006 Scuttle project
+# Copyright (C) 2005 - 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # <alley@ilikeu2.nl>
 #
 # This file is distributed under the same license as the Scuttle package.
 # <alley@ilikeu2.nl>
 #
index 36df105c736c0d77a3b71ea9e18b3041a83c8072..1c6f1aeab180d6952ef00b4e8a74b11a0c849020 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle pt-BR Translation
 # Scuttle pt-BR Translation
-# Copyright (C) 2006 Scuttle project
+# Copyright (C) 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # Marcelo Jorge Vieira (metal) <metal@alucinados.com>, 2006.
 #
 # This file is distributed under the same license as the Scuttle package.
 # Marcelo Jorge Vieira (metal) <metal@alucinados.com>, 2006.
 #
index b6aadcbaed967c72322734926e2f9221f631f7f1..6c52851be3e07e2abfeb1df84cad2aa48177fb20 100644 (file)
@@ -1,5 +1,5 @@
 # Scuttle zh-CN Translation
 # Scuttle zh-CN Translation
-# Copyright (C) 2005 - 2006 Scuttle project
+# Copyright (C) 2005 - 2006 Marcus Campbell
 # This file is distributed under the same license as the Scuttle package.
 # Yanni Zheng <ynzheng@gmail.com>
 #
 # This file is distributed under the same license as the Scuttle package.
 # Yanni Zheng <ynzheng@gmail.com>
 #
index d36139473d074a0f1a3c1c427d5f1f334b3cb07f..38ca3606e29c16351888e1955a3897d866436ae4 100644 (file)
--- a/login.php
+++ b/login.php
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2004 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,8 +18,8 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
-require_once('header.inc.php');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+require_once 'header.inc.php';
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 
 $tplVars = array();
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 
 $tplVars = array();
index bbbb017d91dc9f68e0932fd07ee24028a2d7bb2f..fba6f97bfe4e1533e305cb7a7ada2f8baf1904e8 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2005 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2005 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once 'header.inc.php';
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $tplVars = array();
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $tplVars = array();
index daef205e493f964afd947e9d7a5acf42af4e10f5..5bda611cabc6f9aba6d94632e3584d14406dc8ac 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (C) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (C) 2004 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once 'header.inc.php';
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $tagservice =& ServiceFactory::getServiceInstance('TagService');
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $tagservice =& ServiceFactory::getServiceInstance('TagService');
 $userservice =& ServiceFactory::getServiceInstance('UserService');
index d834144b7807a45b8ecb00ca061790c222f5d2f9..81be208066618bf169bace4e8737a9374b7ef0db 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (C) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (C) 2004 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once 'header.inc.php';
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 
index fdbd9544f2d04e8ceaa963732265424af31a0efa..fba23face40720cad3f8d111fd2183798562c04a 100644 (file)
@@ -1,7 +1,7 @@
 Scuttle 0.8.0
 http://scuttle.org/
 
 Scuttle 0.8.0
 http://scuttle.org/
 
-Copyright (C) 2004 - 2010 Scuttle project
+Copyright (C) 2004 - 2010 Marcus Campbell
 Available under the GNU General Public License
 
 ============
 Available under the GNU General Public License
 
 ============
index 8f95ed6d3ee7f33e24329199590bae13f16ed011..e93c2ab6d4083c7a5e79aeaa899a073b115ada08 100644 (file)
@@ -30,14 +30,20 @@ if ($_POST['submitted']) {
     $posteduser = trim(utf8_strtolower($_POST['username']));
     $postedpass = trim($_POST['password']);
     $postedconf = trim($_POST['passconf']);
     $posteduser = trim(utf8_strtolower($_POST['username']));
     $postedpass = trim($_POST['password']);
     $postedconf = trim($_POST['passconf']);
+    $postedmail = trim($_POST['email']);
 
     // Check token
     if (!isset($_SESSION['token']) || $_POST['token'] != $_SESSION['token']) {
       $tplVars['error'] = T_('Form could not be authenticated. Please try again.');
     }
 
 
     // Check token
     if (!isset($_SESSION['token']) || $_POST['token'] != $_SESSION['token']) {
       $tplVars['error'] = T_('Form could not be authenticated. Please try again.');
     }
 
+    // Check elapsed time
+    if (!isset($_SESSION['token_time']) || time() - $_SESSION['token_time'] < 1) {
+      $tplVars['error'] = T_('Form was submitted too quickly. Please wait before trying again.');
+    }
+
     // Check if form is incomplete
     // Check if form is incomplete
-    elseif (!$posteduser || !$postedpass || !($_POST['email'])) {
+    elseif (!$posteduser || !$postedpass || !$postedmail) {
       $tplVars['error'] = T_('You <em>must</em> enter a username, password and e-mail address.');
     }
 
       $tplVars['error'] = T_('You <em>must</em> enter a username, password and e-mail address.');
     }
 
@@ -62,17 +68,17 @@ if ($_POST['submitted']) {
     }
 
     // Check if e-mail address is blocked
     }
 
     // Check if e-mail address is blocked
-    elseif ($userservice->isBlockedEmail($_POST['email'])) {
+    elseif ($userservice->isBlockedEmail($postedmail)) {
       $tplVars['error'] = T_('This e-mail address is not permitted.');
     }
 
     // Check if e-mail address is valid
       $tplVars['error'] = T_('This e-mail address is not permitted.');
     }
 
     // Check if e-mail address is valid
-    elseif (!$userservice->isValidEmail($_POST['email'])) {
+    elseif (!$userservice->isValidEmail($postedmail)) {
       $tplVars['error'] = T_('E-mail address is not valid. Please try again.');
     }
 
     // Register details
       $tplVars['error'] = T_('E-mail address is not valid. Please try again.');
     }
 
     // Register details
-    elseif ($userservice->addUser($posteduser, $_POST['password'], $_POST['email'])) {
+    elseif ($userservice->addUser($posteduser, $_POST['password'], $postedmail)) {
       // Log in with new username
       $login = $userservice->login($posteduser, $_POST['password']);
       if ($login) {
       // Log in with new username
       $login = $userservice->login($posteduser, $_POST['password']);
       if ($login) {
diff --git a/rss.php b/rss.php
index 4db9773e4d382c83b3b88db92b8292c8ebe071fb..cf10478fa0c946e7eab6d3e04411532e7828b756 100644 (file)
--- a/rss.php
+++ b/rss.php
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (C) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (C) 2004 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 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');
 $cacheservice =& ServiceFactory::getServiceInstance('CacheService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 $cacheservice =& ServiceFactory::getServiceInstance('CacheService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
index 1c2cbc33f2e84fd98a5a38b3578c750a9eb8e5c6..9feaf5cfe8c90386de3e3c5b556a91eb5d729076 100644 (file)
@@ -2,23 +2,21 @@
     <table>
     <tr>
         <?php
     <table>
     <tr>
         <?php
-        $logged_on = false;
+        $logged_on = FALSE;
         if ($userservice->isLoggedOn()) {
         if ($userservice->isLoggedOn()) {
-            $currentUser = $userservice->getCurrentUser();
-            $currentUsername = $currentUser[$userservice->getFieldName('username')];
-            $logged_on = true;
+          $currentUser = $userservice->getCurrentUser();
+          $currentUsername = $currentUser[$userservice->getFieldName('username')];
+          $logged_on = TRUE;
         }
         if ($logged_on || isset($user)) {
         ?>
         <td><?php echo T_('Search' /* Search ... for */); ?></td>
         <td>
             <select name="range">
         }
         if ($logged_on || isset($user)) {
         ?>
         <td><?php echo T_('Search' /* Search ... for */); ?></td>
         <td>
             <select name="range">
-                <?php
-                if (!in_array($range, array($currentUsername, 'all', 'watchlist'))) {
-                ?>
+                <?php if (!in_array($range, array($currentUsername, 'all', 'watchlist')) && $user != $currentUsername): ?>
                 <option value="<?php echo $user ?>"<?php echo $selectUser; ?>><?php echo T_("this user's bookmarks"); ?></option>
                 <?php
                 <option value="<?php echo $user ?>"<?php echo $selectUser; ?>><?php echo T_("this user's bookmarks"); ?></option>
                 <?php
-                }
+                endif;
                 if ($logged_on) {
                 ?>
                 <option value="<?php echo $currentUsername; ?>"<?php echo $selectMy; ?>><?php echo T_('my bookmarks'); ?></option>
                 if ($logged_on) {
                 ?>
                 <option value="<?php echo $currentUsername; ?>"<?php echo $selectMy; ?>><?php echo T_('my bookmarks'); ?></option>
index f0919d89480921826d0bb0025752c9d1f5d93136..1932c285f31709974db094e4fb6918bc473f4a5a 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2005 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2005 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once 'header.inc.php';
 
 // POST
 if (isset($_POST['terms'])) {
 
 // POST
 if (isset($_POST['terms'])) {
index 2d3921936ab2f7b38c38e250c896f14d98afa8ed..2d76a3c2b1bd02d8aa4450b30bad6cde63baf617 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once 'header.inc.php';
 $tagservice = & ServiceFactory :: getServiceInstance('TagService');
 $templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
 $userservice = & ServiceFactory :: getServiceInstance('UserService');
 $tagservice = & ServiceFactory :: getServiceInstance('TagService');
 $templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
 $userservice = & ServiceFactory :: getServiceInstance('UserService');
index 99fa9c873804f49de06b732ad7ac2da512e6ae13..87163b0adf7470301e068d8ddef9aff597e89cfa 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once 'header.inc.php';
 $tagservice = & ServiceFactory :: getServiceInstance('TagService');
 $templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
 $userservice = & ServiceFactory :: getServiceInstance('UserService');
 $tagservice = & ServiceFactory :: getServiceInstance('TagService');
 $templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
 $userservice = & ServiceFactory :: getServiceInstance('UserService');
index 04188ca1d5d04778e7cdade4d73a744e10922926..be358611c540b008777e856898439054c8a82687 100644 (file)
--- a/tags.php
+++ b/tags.php
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2004 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 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');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');
index 9e1b60dc75e1223532dad33930c90c8dc7731583..b42819ed60bd627828febeed0d99b1d83df91d5a 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 Copyright (c) 2005 - 2010 Marcus Campbell
 <?php
 /***************************************************************************
 Copyright (c) 2005 - 2010 Marcus Campbell
-http://sourceforge.net/projects/scuttle/
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
index 61981bb1da829503bfc2c6559521ca55113ddb1b..cfd7cee956d1c2568e1cc758d94460264838c7bf 100644 (file)
--- a/watch.php
+++ b/watch.php
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2004 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -19,7 +18,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once 'header.inc.php';
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 
 @list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 
 @list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
index 8e618edffbf08b33f7dca1a56d089a89eef41b23..3ecc79c6fc76aef540ce00650b0d96bd43bcdf0b 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /***************************************************************************
 <?php
 /***************************************************************************
-Copyright (c) 2004 - 2006 Scuttle project
-http://sourceforge.net/projects/scuttle/
+Copyright (c) 2004 - 2006 Marcus Campbell
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
 http://scuttle.org/
 
 This program is free software; you can redistribute it and/or modify
@@ -18,7 +17,7 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ***************************************************************************/
 along with this program; if not, write to the Free Software
 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');
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 $templateservice =& ServiceFactory::getServiceInstance('TemplateService');

Benjamin Mako Hill || Want to submit a patch?