projects
/
Pman.Admin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
be31d5a
)
GroupRights.php
author
KH Lau
<khlau@roojs.com>
Tue, 30 Jan 2018 08:20:45 +0000
(16:20 +0800)
committer
KH Lau
<khlau@roojs.com>
Tue, 30 Jan 2018 08:20:45 +0000
(16:20 +0800)
GroupRights.php
patch
|
blob
|
history
diff --git
a/GroupRights.php
b/GroupRights.php
index
e0bd346
..
f4be607
100644
(file)
--- a/
GroupRights.php
+++ b/
GroupRights.php
@@
-75,34
+75,35
@@
class Pman_Admin_GroupRights extends Pman
$cur[$k] = clone($gr);
}
$cur[$k] = clone($gr);
}
-
+ $shortname = explode('.',$k);
$ar[] = array(
'id' => $cur[$k]->id * 1, //
'rightname' => $k,
'descript' => isset($defdata[2]) ? $defdata[2] : '' ,
'accessmask' => $cur[$k]->accessmask,
'FullMask' => $defdata[0],
$ar[] = array(
'id' => $cur[$k]->id * 1, //
'rightname' => $k,
'descript' => isset($defdata[2]) ? $defdata[2] : '' ,
'accessmask' => $cur[$k]->accessmask,
'FullMask' => $defdata[0],
- 'group_id' => (int)$_GET['group_id']
+ 'group_id' => (int)$_GET['group_id'],
+ 'shortname' => $shortname[0];
);
}
foreach ($ar as $key => $row) {
);
}
foreach ($ar as $key => $row) {
- $
rightname[$key] = $row['righ
tname'];
+ $
shortname[$key] = $row['shor
tname'];
$descript[$key] = $row['descript'];
}
// Sort the data with volume descending, edition ascending
$descript[$key] = $row['descript'];
}
// Sort the data with volume descending, edition ascending
-
//array_multisort($righ
tname, SORT_ASC, $descript, SORT_ASC, $ar);
+
array_multisort($shor
tname, SORT_ASC, $descript, SORT_ASC, $ar);
//print_r($ar); exit;
//print_r($ar); exit;
-
+ /*
usort($ar, function($a, $b) {
$rdiff = $a['rightname'] - $b['rightname'];
if ($rdiff) return $rdiff;
return $a['descript'] - $b['descript'];
});
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);
print_r($ar);exit;
$this->jdata($ar);