MDL-13766, clean up
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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').': ';
|
||||
|
||||
+23
-26
@@ -38,29 +38,6 @@
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user