Pman.Tab.AdminLogEvents.bjs
[Pman.Admin] / GroupRights.php
index 24a37db..6275f2c 100644 (file)
@@ -87,24 +87,16 @@ class Pman_Admin_GroupRights extends Pman
             );
                 
         }
+        
+        if (isset($_GET['_sort'])) {
+            foreach ($ar as $key => $row) {
+                $shortname[$key]  = $row['shortname'];
+                $descript[$key] = $row['descript'];
+            }
 
-        foreach ($ar as $key => $row) {
-            $shortname[$key]  = $row['shortname'];
-            $descript[$key] = $row['descript'];
+            array_multisort($shortname, SORT_ASC, $descript, SORT_ASC, $ar);        
         }
-
-        // Sort the data with volume descending, edition ascending
-        //array_multisort($shortname, SORT_ASC, $descript, SORT_ASC, $ar);        
-        
-        //print_r($ar); exit;
-        
-        usort($ar, function($a, $b) {          
-                  $rdiff = $a['shortname'] - $b['shortname'];
-            if ($rdiff) return $rdiff; 
-            return $a['descript'] - $b['descript'];     
-        });
         
-        print_r($ar);exit;
         $this->jdata($ar);