]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13766, clean up
authordongsheng <dongsheng>
Tue, 16 Sep 2008 05:33:55 +0000 (05:33 +0000)
committerdongsheng <dongsheng>
Tue, 16 Sep 2008 05:33:55 +0000 (05:33 +0000)
repository/flickr_public/repository.class.php
repository/javascript.php
repository/lib.php

index a2351a800e448463bb81592559e798c8890f7ff4..9868c52389162ad844caa9c228d4c2557cfb1b87 100644 (file)
@@ -134,7 +134,7 @@ class repository_flickr_public extends repository {
 
     public function print_search() {
         parent::print_search();
-        echo '<label>Tag: </label><input type="text" name="tag" /><br />';
+        echo '<label>Tag: </label><br /><input type="text" name="tag" /><br />';
         return true;
     }
 
index b7c3f3ee9411d5cb00efd66b2d4eccfbea6ab972..88f16bb5b6080d989698a818fb6647fdd2fc42fa 100644 (file)
@@ -1,11 +1,9 @@
 <?php // $Id$
-
 ///////////////////////////////////////////////////////////////////////////
 //                                                                       //
 //       Don't modify this file unless you know how it works             //
 //                                                                       //
 ///////////////////////////////////////////////////////////////////////////
-
 /**
  * Return javascript to create file picker to browse repositories
  * @global object $CFG
@@ -17,8 +15,8 @@ function repository_get_client($context) {
     global $CFG, $USER;
     $suffix = uniqid();
     $sesskey = sesskey();
-    $strsaveas    = get_string('saveas', 'repository').': ';
-    $stradd  = get_string('add', 'repository');
+    // language string
+    $stradd       = get_string('add', 'repository');
     $strback      = get_string('back', 'repository');
     $strcancel    = get_string('cancel');
     $strclose     = get_string('close', 'repository');
@@ -39,6 +37,7 @@ function repository_get_client($context) {
     $strmgr       = get_string('manageurl', 'repository');
     $strnoenter   = get_string('noenter', 'repository');
     $strsave      = get_string('save', 'repository');
+    $strsaveas    = get_string('saveas', 'repository').': ';
     $strsaved     = get_string('saved', 'repository');
     $strsaving    = get_string('saving', 'repository');
     $strsize      = get_string('size', 'repository').': ';
index 24a0dbc6af89d9cf5ac9214dfb9af503fa0c09cb..01a820b63f8d7d6d7ed830a73112ba534c2d4b0d 100644 (file)
 
 
 
-/**
- * This is the base class of the repository class
- *
- * To use repository plugin, you need to create a new folder under repository/, named as the remote
- * repository, the subclass must be defined in  the name
-
- *
- * class repository is an abstract class, some functions must be implemented in subclass.
- *
- * See an example of use of this library in repository/boxnet/repository.class.php
- *
- * A few notes:
- *   // print login page or a link to redirect to another page
- *   $repo->print_login();
- *   // call get_listing, and print result
- *   $repo->print_listing();
- *   // print a search box
- *   $repo->print_search();
- *
- * @version 1.0 dev
- * @package repository
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- */
 require_once(dirname(dirname(__FILE__)) . '/config.php');
 require_once(dirname(dirname(__FILE__)) . '/lib/filelib.php');
 require_once(dirname(dirname(__FILE__)) . '/lib/formslib.php');
@@ -437,9 +414,29 @@ function repository_get_types($visible=null) {
 }
 
 /**
- * The base class for all repository plugins
+ * This is the base class of the repository class
+ *
+ * To use repository plugin, see:
+ * http://docs.moodle.org/en/Development:Repository_How_to_Create_Plugin
+ *
+ * class repository is an abstract class, some functions must be implemented in subclass.
+ *
+ * See an example: repository/boxnet/repository.class.php
+ *
+ * A few notes:
+ *   // for ajax file picker, this will print a json string to tell file picker
+ *   // how to build a login form
+ *   $repo->print_login();
+ *   // for ajax file picker, this will return a files list.
+ *   $repo->get_listing();
+ *   // this function will be used for non-javascript version.
+ *   $repo->print_listing();
+ *   // print a search box
+ *   $repo->print_search();
+ *
+ * @package repository
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  */
-
 abstract class repository {
     public $id;
     public $context;
@@ -879,7 +876,7 @@ abstract class repository {
         echo '<input type="hidden" name="repo_id" value="'.$this->id.'" />';
         echo '<input type="hidden" name="ctx_id" value="'.$this->context->id.'" />';
         echo '<input type="hidden" name="seekey" value="'.sesskey().'" />';
-        echo '<input name="s" value="" />';
+        echo '<label>'.get_string('keyword', 'repository').': </label><br/><input name="s" value="" /><br/>';
         return true;
     }