From f873198442c05136a4c6c2bf05f5d0b63595eabe Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 4 Oct 2012 18:40:05 +0200 Subject: [PATCH] Fix: Warning into perms page --- htdocs/comm/fiche.php | 2 +- htdocs/commande/liste.php | 1 + htdocs/core/menus/standard/eldy.lib.php | 1 + htdocs/user/perms.php | 25 +++++++++++++++---------- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index bfb9fa4cc62..e760ff7c393 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -5,7 +5,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index 6ea36d8719c..c8c6198e154 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index a8d028e84dd..4ae5dad0731 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1,6 +1,7 @@ * Copyright (C) 2010 Regis Houssin + * Copyright (C) 2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index e229db46c32..0a1ecd72b56 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -4,6 +4,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -365,17 +366,21 @@ if ($result) print img_picto($langs->trans("Active"),'tick'); print ''; } - else if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission own by group + + else if (is_array($permsgroupbyentity[$entity])) { - if ($caneditperms) - { - print ''; - print $form->textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup")); - print ''; - } - print ''; - print img_picto($langs->trans("Active"),'tick'); - print ''; + if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission own by group + { + if ($caneditperms) + { + print ''; + print $form->textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup")); + print ''; + } + print ''; + print img_picto($langs->trans("Active"),'tick'); + print ''; + } } else {