summaryrefslogtreecommitdiffstats
path: root/lib/class/browse.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-09 06:35:24 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-09 06:35:24 +0000
commit699a85cb82f5b8cec9439a29c2f3312ae84b77e0 (patch)
treedad8be2db019f5c1fb51e417c0e9e04853dded72 /lib/class/browse.class.php
parent796c2692d0cfa4641e0c47700371c24a01412ed1 (diff)
downloadampache-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.php6
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':