From 15b91c7e661d928d8b125ec9cfbda1702319c8b4 Mon Sep 17 00:00:00 2001 From: mensonge Date: Tue, 25 Nov 2008 15:57:29 +0000 Subject: Major refactoring: transform user into object, define parameters used into each file, ... git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@173 b3834d28-1941-0410-a4f8-b48e95affb8f --- services/bookmarkservice.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'services/bookmarkservice.php') diff --git a/services/bookmarkservice.php b/services/bookmarkservice.php index 9127c12..73cdf84 100644 --- a/services/bookmarkservice.php +++ b/services/bookmarkservice.php @@ -20,6 +20,8 @@ class BookmarkService { $userservice = & ServiceFactory :: getServiceInstance('UserService'); $sId = $userservice->getCurrentUserId(); $range = ' AND uId = '. $sId; + } else { + $range = ''; } $query = 'SELECT * FROM '. $this->getTableName() .' WHERE '. $fieldname .' = "'. $this->db->sql_escape($value) .'"'. $range; @@ -271,6 +273,7 @@ class BookmarkService { } else { $arrWatch = $userservice->getWatchlist($user); if (count($arrWatch) > 0) { + $query_3_1 = ''; foreach($arrWatch as $row) { $query_3_1 .= 'B.uId = '. intval($row) .' OR '; } @@ -280,7 +283,7 @@ class BookmarkService { } $query_3 .= ' AND ('. $query_3_1 .') AND B.bStatus IN (0, 1)'; } - + $query_5 = ''; if($hash == null) { $query_5.= ' GROUP BY B.bHash'; -- cgit v1.2.3