mirror of
https://github.com/Mibew/java.git
synced 2025-01-22 17:40:35 +03:00
Check admin permissions
This commit is contained in:
parent
7de97c2a68
commit
3cc49c965a
@ -42,12 +42,16 @@ foreach($options as $opt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['sent'])) {
|
if (isset($_POST['sent'])) {
|
||||||
|
if (is_capable($can_administrate, $operator)) {
|
||||||
foreach($options as $opt) {
|
foreach($options as $opt) {
|
||||||
$settings[$opt] = verifyparam($opt,"/^on$/", "") == "on" ? "1" : "0";
|
$settings[$opt] = verifyparam($opt,"/^on$/", "") == "on" ? "1" : "0";
|
||||||
}
|
}
|
||||||
update_settings();
|
update_settings();
|
||||||
header("Location: $webimroot/operator/features.php?stored");
|
header("Location: $webimroot/operator/features.php?stored");
|
||||||
exit;
|
exit;
|
||||||
|
} else {
|
||||||
|
$errors[] = "Not an administrator.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$page['stored'] = isset($_GET['stored']);
|
$page['stored'] = isset($_GET['stored']);
|
||||||
|
Loading…
Reference in New Issue
Block a user