fix order problem

This commit is contained in:
msquare 2016-11-17 13:16:15 +01:00
parent d64f96b6a1
commit b5784e5961
1 changed files with 4 additions and 4 deletions

View File

@ -85,16 +85,16 @@ function angeltype_delete_controller() {
function angeltype_edit_controller() {
global $privileges, $user;
if (! User_is_AngelType_supporter($user, $angeltype)) {
redirect(page_link_to('angeltypes'));
}
// In supporter mode only allow to modify description
$supporter_mode = ! in_array('admin_angel_types', $privileges);
if (isset($_REQUEST['angeltype_id'])) {
// Edit existing angeltype
$angeltype = load_angeltype();
if (! User_is_AngelType_supporter($user, $angeltype)) {
redirect(page_link_to('angeltypes'));
}
} else {
// New angeltype
if ($supporter_mode) {