From db2f2ddab8b88a8f240ffbffd3665924db8b3e76 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Thu, 11 Oct 2018 11:48:12 +0200 Subject: [PATCH 1/2] Fix resources menu display for turkish translation - Use unicode string comparison for privileges check --- resources/admin/classes/domain/User.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/admin/classes/domain/User.php b/resources/admin/classes/domain/User.php index caf3bb20f..f26e1c12f 100644 --- a/resources/admin/classes/domain/User.php +++ b/resources/admin/classes/domain/User.php @@ -57,8 +57,7 @@ public function getDDDisplayName(){ //used only for allowing access to admin page public function isAdmin(){ $privilege = new Privilege(new NamedArguments(array('primaryKey' => $this->privilegeID))); - - if (strtoupper($privilege->shortName) == 'ADMIN'){ + if (mb_strtoupper($privilege->shortName) == 'ADMIN'){ return true; }else{ return false; @@ -70,7 +69,7 @@ public function isAdmin(){ public function canEdit(){ $privilege = new Privilege(new NamedArguments(array('primaryKey' => $this->privilegeID))); - if ((strtoupper($privilege->shortName) == 'ADD/EDIT') || (strtoupper($privilege->shortName) == 'ADMIN')){ + if ((mb_strtoupper($privilege->shortName) == 'ADD/EDIT') || (strtoupper($privilege->shortName) == 'ADMIN')){ return true; }else{ return false; From fe5dad1fac2d28e38382cfd8d8d87f80edcc6dd4 Mon Sep 17 00:00:00 2001 From: Jeffrey Mudge Date: Tue, 23 Oct 2018 17:25:06 +0200 Subject: [PATCH 2/2] Update resources/admin/classes/domain/User.php Co-Authored-By: veggiematts --- resources/admin/classes/domain/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/admin/classes/domain/User.php b/resources/admin/classes/domain/User.php index f26e1c12f..28dcd22fd 100644 --- a/resources/admin/classes/domain/User.php +++ b/resources/admin/classes/domain/User.php @@ -69,7 +69,7 @@ public function isAdmin(){ public function canEdit(){ $privilege = new Privilege(new NamedArguments(array('primaryKey' => $this->privilegeID))); - if ((mb_strtoupper($privilege->shortName) == 'ADD/EDIT') || (strtoupper($privilege->shortName) == 'ADMIN')){ + if ((mb_strtoupper($privilege->shortName) == 'ADD/EDIT') || (mb_strtoupper($privilege->shortName) == 'ADMIN')){ return true; }else{ return false;