forked from leftypol/leftypol
Web config editor: Write "MOD", "JANITOR", etc. to instance-config instead of just int representations
This commit is contained in:
parent
d4ad874e09
commit
0d1bfa47f1
3 changed files with 24 additions and 3 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue