]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
do not return numbers < 0
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 16 Feb 2010 21:50:49 +0000 (21:50 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 16 Feb 2010 21:50:49 +0000 (21:50 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@652 b3834d28-1941-0410-a4f8-b48e95affb8f

src/SemanticScuttle/Service/Bookmark.php

index 0ac18555b7fedb7ea337cfc500e465de551358ee..3ea5b5c79b8ab089957f509748fb3480f0bda513 100644 (file)
@@ -916,9 +916,10 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
             message_die(GENERAL_ERROR, 'Could not get vars', '', __LINE__, __FILE__, $sql, $this->db);
         }
 
-        $output = $this->db->sql_fetchfield(0, 0) - 1;
+        $count = $this->db->sql_fetchfield(0, 0);
+        $count = ($count > 0) ? $count - 1 : (int)$count;
         $this->db->sql_freeresult($dbresult);
-        return $output;
+        return $count;
     }