X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=blobdiff_plain;f=GroupRights.php;h=6275f2c2a8189e7dd40153a22665b04cd77baf16;hp=daf03b34189e4e0e8473986f0250903ab5044ba4;hb=HEAD;hpb=4b69faa8031d7f6de6c1b55c468c2acdd54f52a9 diff --git a/GroupRights.php b/GroupRights.php index daf03b3..0dbd455 100644 --- a/GroupRights.php +++ b/GroupRights.php @@ -12,7 +12,7 @@ class Pman_Admin_GroupRights extends Pman parent::getAuth(); // load company! $au = $this->getAuthUser(); if (!$au) { - $this->jerr("Not authenticated", array('authFailure' => true)); + $this->jerror("LOGIN-NOAUTH", "Not authenticated", array('authFailure' => true)); } if ($au->company()->comptype !='OWNER') { @@ -87,13 +87,15 @@ 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); } - - array_multisort($shortname, SORT_ASC, $descript, SORT_ASC, $ar); $this->jdata($ar);