diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-10-25 20:09:28 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-10-25 20:09:28 +0000 |
commit | 8d16356f756795f8d881ff8305e2a1ec83c47069 (patch) | |
tree | b97cd00d435744523640c4a2c3cf9726f915faa5 /src/SemanticScuttle/Service | |
parent | 184099743bb508297fb1cd7c2680b89ed68e2813 (diff) | |
download | semanticscuttle-8d16356f756795f8d881ff8305e2a1ec83c47069.tar.gz semanticscuttle-8d16356f756795f8d881ff8305e2a1ec83c47069.tar.bz2 |
remove unreachable code
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@426 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src/SemanticScuttle/Service')
-rw-r--r-- | src/SemanticScuttle/Service/Vote.php | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/SemanticScuttle/Service/Vote.php b/src/SemanticScuttle/Service/Vote.php index 086b2a2..7adf549 100644 --- a/src/SemanticScuttle/Service/Vote.php +++ b/src/SemanticScuttle/Service/Vote.php @@ -34,9 +34,6 @@ */ class SemanticScuttle_Service_Vote extends SemanticScuttle_DbService { - - - /** * Returns the single service instance * @@ -98,10 +95,6 @@ class SemanticScuttle_Service_Vote extends SemanticScuttle_DbService $row = $this->db->sql_fetchrow($dbres); $this->db->sql_freeresult($dbres); - if (!$row) { - return false; - } - return (int)$row['sum']; }//public function getVoting(..) @@ -117,7 +110,8 @@ class SemanticScuttle_Service_Vote extends SemanticScuttle_DbService */ public function getVotes($bookmark) { - $query = 'SELECT COUNT(vote) as count FROM ' . $this->getTableName() + $query = 'SELECT COUNT(vote) as count FROM ' + . $this->getTableName() . ' WHERE bid = "' . $this->db->sql_escape($bookmark) . '"'; if (!($dbres = $this->db->sql_query_limit($query, 1, 0))) { @@ -132,10 +126,6 @@ class SemanticScuttle_Service_Vote extends SemanticScuttle_DbService $row = $this->db->sql_fetchrow($dbres); $this->db->sql_freeresult($dbres); - if (!$row) { - return false; - } - return (int)$row['count']; } @@ -152,7 +142,8 @@ class SemanticScuttle_Service_Vote extends SemanticScuttle_DbService */ public function hasVoted($bookmark, $user) { - $query = 'SELECT COUNT(vote) as count FROM ' . $this->getTableName() + $query = 'SELECT COUNT(vote) as count FROM ' + . $this->getTableName() . ' WHERE' . ' bid = "' . $this->db->sql_escape($bookmark) . '"' . ' AND uid = "' . $this->db->sql_escape($user) . '"'; @@ -169,10 +160,6 @@ class SemanticScuttle_Service_Vote extends SemanticScuttle_DbService $row = $this->db->sql_fetchrow($dbres); $this->db->sql_freeresult($dbres); - if (!$row) { - return null; - } - return (int)$row['count'] == 1; } |