From: moodler Date: Tue, 5 Sep 2006 03:27:08 +0000 (+0000) Subject: Use the defaultsetting if the variable isn't set yet X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=61647ccb92275db3bf8823659274c1a8c98502a0;p=moodle.git Use the defaultsetting if the variable isn't set yet --- diff --git a/lib/adminlib.php b/lib/adminlib.php index 8de5aba5c8..a616083b21 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -1239,7 +1239,7 @@ class admin_setting_configtext extends admin_setting { function get_setting() { global $CFG; - return (isset($CFG->{$this->name}) ? $CFG->{$this->name} : NULL); + return (isset($CFG->{$this->name}) ? $CFG->{$this->name} : $this->defaultsetting); } function write_setting($data) {