mirror of
https://github.com/Mibew/i18n.git
synced 2025-02-02 09:34:41 +03:00
Check admin permissions
This commit is contained in:
parent
c48cf51e58
commit
8a39697351
@ -46,12 +46,16 @@ foreach($options as $opt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['sent'])) {
|
if (isset($_POST['sent'])) {
|
||||||
foreach($options as $opt) {
|
if (is_capable($can_administrate, $operator)) {
|
||||||
$settings[$opt] = verifyparam($opt,"/^on$/", "") == "on" ? "1" : "0";
|
foreach($options as $opt) {
|
||||||
|
$settings[$opt] = verifyparam($opt,"/^on$/", "") == "on" ? "1" : "0";
|
||||||
|
}
|
||||||
|
update_settings();
|
||||||
|
header("Location: $webimroot/operator/features.php?stored");
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
$errors[] = "Not an administrator.";
|
||||||
}
|
}
|
||||||
update_settings();
|
|
||||||
header("Location: $webimroot/operator/features.php?stored");
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$page['stored'] = isset($_GET['stored']);
|
$page['stored'] = isset($_GET['stored']);
|
||||||
@ -63,4 +67,4 @@ prepare_menu($operator);
|
|||||||
setup_settings_tabs(1);
|
setup_settings_tabs(1);
|
||||||
start_html_output();
|
start_html_output();
|
||||||
require('../view/features.php');
|
require('../view/features.php');
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user