mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-26677 fixed undefined index usewatermarks in flickr plugin
This commit is contained in:
parent
c3f85e22d9
commit
d55846d8bd
@ -66,9 +66,14 @@ if (!empty($edit) || !empty($new)) {
|
||||
if ($edit) {
|
||||
$settings = array();
|
||||
$settings['name'] = $fromform->name;
|
||||
var_dump($fromform);
|
||||
if (!$instance->readonly) {
|
||||
foreach($configs as $config) {
|
||||
$settings[$config] = $fromform->$config;
|
||||
if (isset($fromform->$config)) {
|
||||
$settings[$config] = $fromform->$config;
|
||||
} else {
|
||||
$settings[$config] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
$success = $instance->set_option($settings);
|
||||
|
@ -456,7 +456,7 @@ class repository_flickr_public extends repository {
|
||||
public function instance_config_form($mform) {
|
||||
$mform->addElement('text', 'email_address', get_string('emailaddress', 'repository_flickr_public'));
|
||||
$mform->addElement('checkbox', 'usewatermarks', get_string('watermark', 'repository_flickr_public'));
|
||||
//$mform->addRule('email_address', get_string('required'), 'required', null, 'client');
|
||||
$mform->setDefault('usewatermarks', 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -498,7 +498,7 @@ class repository_flickr_public extends repository {
|
||||
public static function plugin_init() {
|
||||
//here we create a default instance for this type
|
||||
|
||||
$id = repository::static_function('flickr_public','create', 'flickr_public', 0, get_system_context(), array('name'=>'', 'email_address' => null), 0);
|
||||
$id = repository::static_function('flickr_public','create', 'flickr_public', 0, get_system_context(), array('name'=>'', 'email_address' => null, 'usewatermarks' => false), 0);
|
||||
if (empty($id)) {
|
||||
return false;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user