]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15488, move search_result flag to ws.php
authordongsheng <dongsheng>
Mon, 22 Sep 2008 01:10:52 +0000 (01:10 +0000)
committerdongsheng <dongsheng>
Mon, 22 Sep 2008 01:10:52 +0000 (01:10 +0000)
repository/flickr_public/repository.class.php
repository/lib.php
repository/ws.php

index 57c8530250dd5d6fd8c8e677b5220a7e7ac1189c..864963b7fa87efc6776885b33fc19b62c96f1ef1 100644 (file)
@@ -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);
     }
 
index 8d3efc7f8c53a159d18d2746127a12b6e57f4669..eec60b8d58b2afe8ec2e1d701e211e784b7d2086 100644 (file)
@@ -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
index bf097c54b10cf622ee4fbbb6786835702490fd3c..dbcbe98a552ab381e43446841b935fa756d1f4d1 100644 (file)
@@ -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();