fixed error message when empty site full or short name - moved $SITE reinitialisation into setting method

This commit is contained in:
skodak
2006-10-16 07:52:52 +00:00
parent b5a814308a
commit 7f5f0ae62b
2 changed files with 5 additions and 3 deletions
+4 -1
View File
@@ -1693,7 +1693,10 @@ class admin_setting_sitesettext extends admin_setting_configtext {
$record->id = $this->id;
$record->{$this->name} = $data;
$record->timemodified = time();
return (update_record('course', $record) ? '' : get_string('errorsetting', 'admin') . $this->visiblename . '<br />');
$status = update_record('course', $record) ? '' : get_string('errorsetting', 'admin') . $this->visiblename . '<br />';
//now update $SITE
global $SITE;
$SITE = get_record('course', 'id', $SITE->id);
}
}