From: dongsheng Date: Mon, 22 Sep 2008 01:10:52 +0000 (+0000) Subject: MDL-15488, move search_result flag to ws.php X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6ecf0dfa15ad9cbdcd8823fe44f8616119e0ac05;p=moodle.git MDL-15488, move search_result flag to ws.php --- diff --git a/repository/flickr_public/repository.class.php b/repository/flickr_public/repository.class.php index 57c8530250..864963b7fa 100644 --- a/repository/flickr_public/repository.class.php +++ b/repository/flickr_public/repository.class.php @@ -151,7 +151,6 @@ class repository_flickr_public extends repository { $SESSION->$sess_text = $search_text; } $ret = array(); - $ret['search_result'] = true; return $this->build_list($photos, $page, &$ret); } diff --git a/repository/lib.php b/repository/lib.php index 8d3efc7f8c..eec60b8d58 100644 --- a/repository/lib.php +++ b/repository/lib.php @@ -801,7 +801,6 @@ abstract class repository { * 'manage' => (string) link to file manager, * 'nologin' => (bool) requires login, * 'nosearch' => (bool) no search link, - * 'search_result' => (bool) this list is a searching result, * 'upload' => array( // upload manager * 'name' => (string) label of the form element, * 'id' => (string) id of the form element diff --git a/repository/ws.php b/repository/ws.php index bf097c54b1..dbcbe98a55 100644 --- a/repository/ws.php +++ b/repository/ws.php @@ -142,7 +142,9 @@ EOD; break; case 'search': try { - echo json_encode($repo->search($search_text)); + $search_result = $repo->search($search_text); + $search_result['search_result'] = true; + echo json_encode($search_result); } catch (repository_exception $e) { $err = new stdclass; $err->e = $e->getMessage();