From f0dd55721f5fccc5b83f897062780c1d835f7115 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 26 Apr 2007 08:31:25 +0000 Subject: [PATCH] Ajout detection des id permissions en doublons --- htdocs/admin/system/dolibarr.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 5a2c8ea396b..964c116ea7c 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -1,5 +1,6 @@ + * Copyright (C) 2007 Rodolphe Quiedeville * * 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 @@ -20,9 +21,9 @@ */ /** - \file htdocs/admin/system/dolibarr.php - \brief Fichier page info systemes Dolibarr - \version $Revision$ + \file htdocs/admin/system/dolibarr.php + \brief Fichier page info systemes Dolibarr + \version $Revision$ */ require("./pre.inc.php"); @@ -114,6 +115,7 @@ print ''; $var=false; $sortorder=$modules_names; ksort($sortorder); +$rights_ids = array(); foreach($sortorder as $numero=>$name) { $idperms=""; @@ -130,6 +132,7 @@ foreach($sortorder as $numero=>$name) foreach($modules[$numero]->rights as $rights) { $idperms.=($idperms?",":"").$rights[0]; + array_push($rights_ids, $rights[0]); } } print ''.($idperms?$idperms:" ").''; @@ -137,8 +140,13 @@ foreach($sortorder as $numero=>$name) } print ''; print '
'; - +sort($rights_ids); +foreach($rights_ids as $right_id) +{ + if ($old == $right_id) + print "Attention doublon sur la permission : $right_id
"; + $old = $right_id; +} llxFooter('$Date$ - $Revision$'); - ?>