diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-08-09 06:35:24 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-08-09 06:35:24 +0000 |
commit | 699a85cb82f5b8cec9439a29c2f3312ae84b77e0 (patch) | |
tree | dad8be2db019f5c1fb51e417c0e9e04853dded72 /lib/class/browse.class.php | |
parent | 796c2692d0cfa4641e0c47700371c24a01412ed1 (diff) | |
download | ampache-699a85cb82f5b8cec9439a29c2f3312ae84b77e0.tar.gz ampache-699a85cb82f5b8cec9439a29c2f3312ae84b77e0.tar.bz2 ampache-699a85cb82f5b8cec9439a29c2f3312ae84b77e0.zip |
fixed some ratings stuff, fixed some searching stuff as well
Diffstat (limited to 'lib/class/browse.class.php')
-rw-r--r-- | lib/class/browse.class.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php index 42152bd2..076b8849 100644 --- a/lib/class/browse.class.php +++ b/lib/class/browse.class.php @@ -181,7 +181,7 @@ class Browse { // First we need to get the SQL statement we are going to run // This has to run against any possible filters (dependent on type) $sql = self::get_sql(); -debug_event('sql',$sql,'1'); + $db_results = Dba::query($sql); $results = array(); @@ -422,7 +422,9 @@ debug_event('sql',$sql,'1'); // Limit is based on the users preferences $limit = $GLOBALS['user']->prefs['offset_limit'] ? $GLOBALS['user']->prefs['offset_limit'] : '25'; - $object_ids = array_slice($object_ids,self::$start,$limit); + if (count($object_ids) > $start) { + $object_ids = array_slice($object_ids,self::$start,$limit); + } switch ($_SESSION['browse']['type']) { case 'song': |