summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service/Bookmark.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle/Service/Bookmark.php')
-rw-r--r--src/SemanticScuttle/Service/Bookmark.php10
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;