Web config editor: Write "MOD", "JANITOR", etc. to instance-config instead of just int representations

This commit is contained in:
Michael Foster 2013-08-03 05:41:01 -04:00
parent d4ad874e09
commit 0d1bfa47f1
3 changed files with 24 additions and 3 deletions

View file

@ -2010,7 +2010,20 @@ function mod_config() {
$config_append .= '[' . var_export($var['name'], true) . ']';
}
$config_append .= ' = ' . var_export($value, true) . ";\n";
$config_append .= ' = ';
if ($var['permissions'] && in_array($value, array(JANITOR, MOD, ADMIN, DISABLED))) {
$perm_array = array(
JANITOR => 'JANITOR',
MOD => 'MOD',
ADMIN => 'ADMIN',
DISABLED => 'DISABLED'
);
$config_append .= $perm_array[$value];
} else {
$config_append .= var_export($value, true);
}
$config_append .= ";\n";
}
}