summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service/Bookmark.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-02-16 21:50:49 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-02-16 21:50:49 +0000
commit0c930607f0444fef11e2fb7d5c50eadd905cccc7 (patch)
tree2207290bb52488dd6bc5564a737ee81da9f79d11 /src/SemanticScuttle/Service/Bookmark.php
parent7a8c92ff1aaa3c4b6b60319a9502288fc9395531 (diff)
downloadsemanticscuttle-0c930607f0444fef11e2fb7d5c50eadd905cccc7.tar.gz
semanticscuttle-0c930607f0444fef11e2fb7d5c50eadd905cccc7.tar.bz2
do not return numbers < 0
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@652 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src/SemanticScuttle/Service/Bookmark.php')
-rw-r--r--src/SemanticScuttle/Service/Bookmark.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php
index 0ac1855..3ea5b5c 100644
--- a/src/SemanticScuttle/Service/Bookmark.php
+++ b/src/SemanticScuttle/Service/Bookmark.php
@@ -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;
}