GroupRights.php
authorKH Lau <khlau@roojs.com>
Tue, 30 Jan 2018 08:09:47 +0000 (16:09 +0800)
committerKH Lau <khlau@roojs.com>
Tue, 30 Jan 2018 08:09:47 +0000 (16:09 +0800)
GroupRights.php

index 29f0b6f..f0ae169 100644 (file)
@@ -86,12 +86,23 @@ class Pman_Admin_GroupRights extends Pman
             );
                 
         }
-        //print_r($ar);
+
+        foreach ($ar as $key => $row) {
+            $rightname[$key]  = $row['rightname'];
+            $descript[$key] = $row['descript'];
+        }
+
+        // Sort the data with volume descending, edition ascending
+        array_multisort($rightname, SORT_ASC, $descript, SORT_ASC, $ar);        
+        
+        print_r($ar); exit;
+        /*
         usort($ar, function($a, $b) {          
                   $rdiff = $a['rightname'] - $b['rightname'];
             if ($rdiff) return $rdiff; 
             return $a['descript'] - $b['descript'];     
         });
+        */
         //print_r($ar);exit;
         $this->jdata($ar);