Module: nagvis
Branch: master
Commit: f842ab9211cc9c2c3576e0f5bdab8a61b880dd27
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=f842ab9211cc9c2c3576e0f5bdab8a61b880dd27

Author: LaMi <[email protected]>
Date:   Sun Feb 21 16:42:48 2010 +0100

Sorting the available permissions now. Should give a better overview

---

 .../core/classes/CoreAuthorisationHandler.php      |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/share/server/core/classes/CoreAuthorisationHandler.php 
b/share/server/core/classes/CoreAuthorisationHandler.php
index 3c77cb4..91ace8c 100644
--- a/share/server/core/classes/CoreAuthorisationHandler.php
+++ b/share/server/core/classes/CoreAuthorisationHandler.php
@@ -138,6 +138,10 @@ class CoreAuthorisationHandler {
                
                return $this->MOD->getAllRoles();
        }
+
+       private function sortPerms($a, $b) {
+               return strcmp($a['mod'].$a['obj'].$a['act'], 
$b['mod'].$b['obj'].$b['act']);
+       }
        
        public function getAllVisiblePerms() {
                $aReturn = Array();
@@ -151,6 +155,8 @@ class CoreAuthorisationHandler {
                                $aReturn[] = $perm;
                        }
                }
+
+               usort($aReturn, Array($this, 'sortPerms'));
                
                return $aReturn;
        }


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to