diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-11-02 09:42:53 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-11-02 09:42:53 +0000 |
commit | 79b28ed45cd0f5e2fcc043bf716d011c6571642e (patch) | |
tree | bf999f1b386efc78961802d840e96bb9a7b666f1 /src/SemanticScuttle/Service | |
parent | ed1636cb5164aa6b14c3dd5f95ad3fea79939a4a (diff) | |
download | semanticscuttle-79b28ed45cd0f5e2fcc043bf716d011c6571642e.tar.gz semanticscuttle-79b28ed45cd0f5e2fcc043bf716d011c6571642e.tar.bz2 |
hide bookmarks below a configurable threshold
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@507 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src/SemanticScuttle/Service')
-rw-r--r-- | src/SemanticScuttle/Service/Bookmark.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php index 949b073..afc4c89 100644 --- a/src/SemanticScuttle/Service/Bookmark.php +++ b/src/SemanticScuttle/Service/Bookmark.php @@ -550,9 +550,17 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService } $query_1 .= 'B.*, U.'. $userservice->getFieldName('username'); - $query_2 = ' FROM '. $userservice->getTableName() .' AS U, '. $this->getTableName() .' AS B'; + $query_2 = ' FROM '. $userservice->getTableName() .' AS U' + . ', '. $this->getTableName() .' AS B'; $query_3 = ' WHERE B.uId = U.'. $userservice->getFieldName('primary') . $privacy; + + if ($GLOBALS['enableVoting'] && $GLOBALS['hideBelowVoting'] !== null + && !$userservice->isAdmin($userservice->getCurrentUserId()) + ) { + $query_3 .= ' AND B.bVoting >= ' . (int)$GLOBALS['hideBelowVoting']; + } + if (is_null($watched)) { if (!is_null($user)) { $query_3 .= ' AND B.uId = '. $user; |