From: jerome Date: Fri, 24 Oct 2008 08:39:37 +0000 (+0000) Subject: MDL-15352: fix search (Moodle remote plugin) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e33014943d86ffe258d77666b6bce352bd598bf1;p=moodle.git MDL-15352: fix search (Moodle remote plugin) --- diff --git a/repository/remotemoodle/repository.class.php b/repository/remotemoodle/repository.class.php index 60864e4670..38992bd18f 100644 --- a/repository/remotemoodle/repository.class.php +++ b/repository/remotemoodle/repository.class.php @@ -65,11 +65,10 @@ class repository_remotemoodle extends repository { * @param $username * @return */ - public function getFileList($username) { + public function getFileList($username, $search) { global $DB, $USER, $MNET_REMOTE_CLIENT, $CFG; $USER = $DB->get_record('user',array('username' => $username, 'mnethostid' => $MNET_REMOTE_CLIENT->id)); $ret = array(); - $search = ''; $ret['nologin'] = true; $ret['manage'] = $CFG->wwwroot .'/files/index.php'; // temporary $browser = get_file_browser(); @@ -217,7 +216,7 @@ class repository_remotemoodle extends repository { * @param $search_text * @return */ - public function search($search_text) { + public function search($search_text) { return $this->get_listing('', $search_text); } @@ -271,7 +270,8 @@ class repository_remotemoodle extends repository { $client = new mnet_xmlrpc_client(); $client->set_method('repository/remotemoodle/repository.class.php/getFileList'); - $client->add_param($USER->username); + $client->add_param($USER->username); + $client->add_param($search); $client->send($mnet_peer);