MDL-31238 remove now unnecessary null to stdClass conversion for plugin settings

This commit is contained in:
Petr Skoda
2012-01-24 23:56:58 +01:00
committed by Eloy Lafuente (stronk7)
parent 5da7b22027
commit d160a5db4a
2 changed files with 2 additions and 9 deletions
+1 -4
View File
@@ -950,10 +950,7 @@ abstract class enrol_plugin {
protected function load_config() {
if (!isset($this->config)) {
$name = $this->get_name();
if (!$config = get_config("enrol_$name")) {
$config = new stdClass();
}
$this->config = $config;
$this->config = get_config("enrol_$name");
}
}
+1 -5
View File
@@ -2345,11 +2345,7 @@ function get_message_processor($type) {
* @return object $processors object containing information on message processors
*/
function get_message_output_default_preferences() {
$preferences = get_config('message');
if (!$preferences) {
$preferences = new stdClass();
}
return $preferences;
return get_config('message');
}
/**