]> git.mjollnir.org Git - moodle.git/commitdiff
Use the defaultsetting if the variable isn't set yet
authormoodler <moodler>
Tue, 5 Sep 2006 03:27:08 +0000 (03:27 +0000)
committermoodler <moodler>
Tue, 5 Sep 2006 03:27:08 +0000 (03:27 +0000)
lib/adminlib.php

index 8de5aba5c80cad643e02a8b646affb70229deb10..a616083b2188d47f99be2278971c4b7ffdd47875 100644 (file)
@@ -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) {