From 79b28ed45cd0f5e2fcc043bf716d011c6571642e Mon Sep 17 00:00:00 2001 From: cweiske Date: Mon, 2 Nov 2009 09:42:53 +0000 Subject: hide bookmarks below a configurable threshold git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@507 b3834d28-1941-0410-a4f8-b48e95affb8f --- src/SemanticScuttle/Service/Bookmark.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/SemanticScuttle') 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; -- cgit v1.2.3