summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/class/browse.class.php12
-rw-r--r--lib/search.php28
-rw-r--r--localplay.php3
-rw-r--r--search.php1
4 files changed, 15 insertions, 29 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php
index 99fd42da..2aea8a8d 100644
--- a/lib/class/browse.class.php
+++ b/lib/class/browse.class.php
@@ -211,6 +211,16 @@ class Browse {
} // set_static_content
/**
+ * save_objects
+ * This calles the internal query stuff
+ */
+ public static function save_objects($results) {
+
+ Query::save_objects($results);
+
+ } // save_objects
+
+ /**
* get_saved
* This looks in the session for the saved
* stuff and returns what it finds
@@ -224,7 +234,7 @@ class Browse {
if (!Query::is_simple()) {
// If not then we're going to need to read from the database :(
- $sid = session_id() . '::' . self::$type;
+ $sid = session_id() . '::' . Query::get_type();
$sql = "SELECT `data` FROM `tmp_browse` WHERE `sid`='$sid'";
$db_results = Dba::read($sql);
diff --git a/lib/search.php b/lib/search.php
index 01946745..4a10aff7 100644
--- a/lib/search.php
+++ b/lib/search.php
@@ -182,7 +182,7 @@ function search_song($data,$operator,$method,$limit) {
// This is a little more complext, pull a list of IDs that have this average rating
$rating_sql = "SELECT `object_id`,AVG(`rating`.`rating`) AS avgrating FROM `rating` " .
"WHERE `object_type`='song' GROUP BY `object_id`";
- $db_results = Dba::query($rating_sql);
+ $db_results = Dba::read($rating_sql);
// Fill it with one value to prevent sql error on no results
$where_sql .= " `song`.`id` IN (";
@@ -238,7 +238,7 @@ function search_song($data,$operator,$method,$limit) {
*/
$_SESSION['userdata']['stored_search'] = $sql;
- $db_results = Dba::query($sql);
+ $db_results = Dba::read($sql);
$results = array();
@@ -251,28 +251,4 @@ function search_song($data,$operator,$method,$limit) {
} // search_songs
-/**
- * show_search
- * This shows the results of a search, it takes the input from a run_search function call
- * @package Search
- * @catagory Display
- */
-function show_search($type,$results) {
-
- /* Display based on the type of object we are trying to view */
- switch ($type) {
- case 'artist':
-
- break;
- case 'album':
-
- break;
- case 'song':
- default:
- show_songs($results,0);
- break;
- } // end type switch
-
-} // show_search
-
?>
diff --git a/localplay.php b/localplay.php
index 27871aa0..6aef4b2b 100644
--- a/localplay.php
+++ b/localplay.php
@@ -83,8 +83,7 @@ switch ($_REQUEST['action']) {
require_once Config::get('prefix') . '/templates/show_localplay_status.inc.php';
Browse::set_type('playlist_localplay');
Browse::set_static_content(1);
- Browse::save_objects($objects);
- Browse::show_objects();
+ Browse::show_objects($objects);
break;
} // end switch action
diff --git a/search.php b/search.php
index 9857f8c9..ae2fa297 100644
--- a/search.php
+++ b/search.php
@@ -45,6 +45,7 @@ switch ($_REQUEST['action']) {
$results = run_search($_REQUEST);
Browse::set_type('song');
Browse::reset();
+ Browse::save_objects($results);
Browse::show_objects($results);
break;
case 'save_as_track':