diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-25 15:57:29 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-25 15:57:29 +0000 |
commit | 15b91c7e661d928d8b125ec9cfbda1702319c8b4 (patch) | |
tree | 092d474c05e414bb04a8c428b8ff6cb9ccab765d /services/bookmarkservice.php | |
parent | 9aafe7551eb5a73739709e72465031db7a1531b4 (diff) | |
download | semanticscuttle-15b91c7e661d928d8b125ec9cfbda1702319c8b4.tar.gz semanticscuttle-15b91c7e661d928d8b125ec9cfbda1702319c8b4.tar.bz2 |
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
Diffstat (limited to 'services/bookmarkservice.php')
-rw-r--r-- | services/bookmarkservice.php | 5 |
1 files changed, 4 insertions, 1 deletions
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'; |