summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-08-31 05:52:30 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-08-31 05:52:30 +0000
commit12a6c9adddc3ad232452275c2721cd370e9d76ca (patch)
treeb0354272b3bcd67044206751117c591a10bc1e0c
parent0aebfb24e5b26adf1101f0cd3703660764ced57f (diff)
downloadampache-12a6c9adddc3ad232452275c2721cd370e9d76ca.tar.gz
ampache-12a6c9adddc3ad232452275c2721cd370e9d76ca.tar.bz2
ampache-12a6c9adddc3ad232452275c2721cd370e9d76ca.zip
fix search when no results are found, actually show the correct "error"
-rw-r--r--lib/class/browse.class.php2
-rw-r--r--lib/search.php4
-rw-r--r--search.php1
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php
index af8ddc03..f245d7fa 100644
--- a/lib/class/browse.class.php
+++ b/lib/class/browse.class.php
@@ -936,7 +936,7 @@ class Browse {
$object_ids = self::get_saved();
}
else {
- $object_ids = $object_ids ? $object_ids : self::get_saved();
+ $object_ids = is_array($object_ids) ? $object_ids : self::get_saved();
self::save_objects($object_ids);
}
diff --git a/lib/search.php b/lib/search.php
index 2804c794..a621fc6e 100644
--- a/lib/search.php
+++ b/lib/search.php
@@ -85,7 +85,7 @@ function run_search($data) {
break;
} // end switch
- return false;
+ return array();
} // run_search
@@ -219,6 +219,8 @@ function search_song($data,$operator,$method,$limit) {
$_SESSION['userdata']['stored_search'] = $sql;
$db_results = Dba::query($sql);
+
+ $results = array();
while ($row = Dba::fetch_assoc($db_results)) {
$results[] = $row['id'];
diff --git a/search.php b/search.php
index 9a893469..9857f8c9 100644
--- a/search.php
+++ b/search.php
@@ -45,7 +45,6 @@ switch ($_REQUEST['action']) {
$results = run_search($_REQUEST);
Browse::set_type('song');
Browse::reset();
- Browse::set_static_content(1);
Browse::show_objects($results);
break;
case 'save_as_track':