]> git.mjollnir.org Git - moodle.git/commitdiff
Better set_config (give immediate results)
authormoodler <moodler>
Mon, 18 Aug 2003 17:41:06 +0000 (17:41 +0000)
committermoodler <moodler>
Mon, 18 Aug 2003 17:41:06 +0000 (17:41 +0000)
lib/moodlelib.php

index 7bd1ceb6e6f91bed7701ec1dfe8356586db888e0..19f764ed71c32dd28b0a7cb0259f99a884d19f11 100644 (file)
@@ -54,6 +54,9 @@ function optional_variable(&$var, $default=0) {
 
 function set_config($name, $value) {
 /// No need for get_config because they are usually always available in $CFG
+    global $CFG;
+
+    $CFG->$name = $value;  // So it's defined for this invocation at least
 
     if (get_field("config", "name", "name", $name)) {
         return set_field("config", "value", $value, "name", $name);