summaryrefslogtreecommitdiffstats
path: root/lib/class/api.class.php
diff options
context:
space:
mode:
authorPaul Arthur <flowerysong00@yahoo.com>2011-04-02 00:22:55 -0400
committerPaul Arthur <flowerysong00@yahoo.com>2011-04-02 00:48:58 -0400
commita9da6a6fa22325ba0dfecd4d46ae23305473796f (patch)
treeacef914ee602bfeb3eed98f5f06e79603a6eb74f /lib/class/api.class.php
parent91a6eb3a682667f49122fab5d807e8650c0d3959 (diff)
downloadampache-a9da6a6fa22325ba0dfecd4d46ae23305473796f.tar.gz
ampache-a9da6a6fa22325ba0dfecd4d46ae23305473796f.tar.bz2
ampache-a9da6a6fa22325ba0dfecd4d46ae23305473796f.zip
Reworked search
Still has tentacles and should have been integrated into the existing API/Browse implementation better, but it's functional.
Diffstat (limited to 'lib/class/api.class.php')
-rw-r--r--lib/class/api.class.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php
index 508d38c2..9bd659a4 100644
--- a/lib/class/api.class.php
+++ b/lib/class/api.class.php
@@ -594,11 +594,13 @@ class Api {
/**
* search_songs
- * This returns the songs and returns... songs
+ * This searches the songs and returns... songs
*/
public static function search_songs($input) {
+ $array['rule_1'] = 'anywhere';
+ $array['rule_1_input'] = $input['filter'];
+ $array['rule_1_operator'] = 0;
- $array['s_all'] = $input['filter'];
ob_end_clean();
xmlData::set_offset($input['offset']);
@@ -608,7 +610,7 @@ class Api {
//Run search references these variables, ooh the huge manatee
unset($input['limit'],$input['offset']);
- $results = run_search($array);
+ $results = Search::run($array);
echo xmlData::songs($results);