mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-24 21:46:11 +00:00
General fixes
+Fixed a bug that permitted to edit alliance leader's permissions
This commit is contained in:
@@ -452,8 +452,9 @@ class Alliance {
|
||||
}
|
||||
|
||||
if($this->userPermArray['opt1'] == 0) $form->addError("perm", NO_PERMISSION);
|
||||
elseif($database->getUserField($post['a_user'], "alliance", 0) != $session->alliance) $form->addError("perm", USER_NOT_IN_YOUR_ALLY);
|
||||
elseif($database->getUserField($post['a_user'], "alliance", 0) != $session->alliance) $form->addError("perm", USER_NOT_IN_YOUR_ALLY);
|
||||
elseif($post['a_user'] == $session->uid) $form->addError("perm", CANT_EDIT_YOUR_PERMISSIONS);
|
||||
elseif($database->isAllianceOwner($_POST['a_user'])) $form->addError("perm", CANT_EDIT_LEADER_PERMISSIONS);
|
||||
else
|
||||
{
|
||||
$database->updateAlliPermissions($post['a_user'], $session->alliance, $post['a_titel'], $post['e1'], $post['e2'], $post['e3'], $post['e4'], $post['e5'], $post['e6'], $post['e7']);
|
||||
|
||||
@@ -75,6 +75,7 @@ define("ALREADY_ALLY_MEMBER","You're already in an alliance");
|
||||
define("ALLY_TOO_LOW", "You must have a level 3 or greater embassy");
|
||||
define("USER_NOT_IN_YOUR_ALLY","This user is not in your alliance!");
|
||||
define("CANT_EDIT_YOUR_PERMISSIONS","You can't edit your own permissions!");
|
||||
define("CANT_EDIT_LEADER_PERMISSIONS","Alliance leader's permissions can't be edited!");
|
||||
define("NO_PERMISSION", "You don't have enough permissions!");
|
||||
define("NAME_OR_DIPL_EMPTY", "Name or diplomacy empty");
|
||||
define("ALLY_DOESNT_EXISTS","Alliance does not exist");
|
||||
|
||||
Reference in New Issue
Block a user