permcats[] = [ 'name' => $name, 'localname' => $localname, 'perms' => Zaccess\Permissions::Operms($perms) ]; $p = Zaccess\PermissionRoles::permcats(local_channel()); if($p) { for($x = 0; $x < count($p); $x++) { $this->permcats[] = [ 'name' => $p[$x][0], 'localname' => $p[$x][1], 'perms' => Zaccess\Permissions::Operms(Zaccess\Permissions::FilledPerms($p[$x][2])) ]; } } if(argc() > 1 && $this->permcats) { foreach($this->permcats as $permcat) { if(strcasecmp($permcat['name'],argv(1)) === 0) { json_return_and_die($permcat); } } json_return_and_die(['error' => true]); } json_return_and_die($this->permcats); } }