MDL-15402: refactor admin_config_form() into type_config_form()
This commit is contained in:
@@ -169,7 +169,7 @@ class repository_boxnet extends repository {
|
||||
return array('share_url');
|
||||
}
|
||||
|
||||
public function admin_config_form(&$mform) {
|
||||
public function type_config_form(&$mform) {
|
||||
$public_account = get_config('boxnet', 'public_account');
|
||||
$api_key = get_config('boxnet', 'api_key');
|
||||
if (empty($api_key)) {
|
||||
|
||||
@@ -188,7 +188,7 @@ class repository_flickr extends repository {
|
||||
return array('email_address');
|
||||
}
|
||||
|
||||
public function admin_config_form(&$mform) {
|
||||
public function type_config_form(&$mform) {
|
||||
global $CFG;
|
||||
$api_key = get_config('flickr', 'api_key');
|
||||
$secret = get_config('flickr', 'secret');
|
||||
|
||||
@@ -182,7 +182,7 @@ class repository_flickr_public extends repository {
|
||||
return array('email_address');
|
||||
}
|
||||
|
||||
public function admin_config_form(&$mform) {
|
||||
public function type_config_form(&$mform) {
|
||||
$api_key = get_config('flickr_public', 'api_key');
|
||||
if (empty($api_key)) {
|
||||
$api_key = '';
|
||||
|
||||
+3
-3
@@ -917,7 +917,7 @@ abstract class repository {
|
||||
* Edit/Create Admin Settings Moodle form
|
||||
* @param object $ Moodle form (passed by reference)
|
||||
*/
|
||||
public function admin_config_form(&$mform) {
|
||||
public function type_config_form(&$mform) {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1338,10 +1338,10 @@ final class repository_admin_form extends moodleform {
|
||||
$mform->addElement('hidden', 'plugin', $this->plugin);
|
||||
// let the plugin add its specific fields
|
||||
if (!$this->instance) {
|
||||
$result = repository_static_function($this->plugin, 'admin_config_form', $mform);
|
||||
$result = repository_static_function($this->plugin, 'type_config_form', $mform);
|
||||
} else {
|
||||
$classname = 'repository_' . $this->instance->get_typename();
|
||||
$result = call_user_func(array($classname,'admin_config_form'),$mform);
|
||||
$result = call_user_func(array($classname,'type_config_form'),$mform);
|
||||
}
|
||||
|
||||
// and set the data if we have some.
|
||||
|
||||
Reference in New Issue
Block a user