$record->id = SITEID;
$record->{$this->name} = $data;
$record->timemodified = time();
- return($DB->update_record('course', $record) ? '' : get_string('errorsetting', 'admin'));
+ return ($DB->update_record('course', $record) ? '' : get_string('errorsetting', 'admin'));
}
public function output_html($data, $query='') {
$adminroot->errors[$fullname]->id = $setting->get_id();
$adminroot->errors[$fullname]->error = $error;
}
- if ($original !== serialize($setting->get_setting())) {
+ // $SITE didn't update synchronously, and we shouldn't
+ // update in this loop (expensive to do this). $SITE will
+ // be updated at the end of this function, see MDL-17966
+ // if ($original !== serialize($setting->get_setting())) {
+ if ($original !== serialize($data[$fullname])) {
$count++;
$callbackfunction = $setting->updatedcallback;
if (function_exists($callbackfunction)) {