mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Better set_config (give immediate results)
This commit is contained in:
parent
5be7800c12
commit
42282810f8
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user