diff options
Diffstat (limited to 'includes/controller')
-rw-r--r-- | includes/controller/angeltypes_controller.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php index d3690645..7566a80e 100644 --- a/includes/controller/angeltypes_controller.php +++ b/includes/controller/angeltypes_controller.php @@ -27,6 +27,9 @@ function angeltypes_controller() { case 'delete': list($title, $content) = angeltype_delete_controller(); break; + case 'about': + list($title, $content) = angeltypes_about_controller(); + break; } return array( @@ -36,6 +39,22 @@ function angeltypes_controller() { } /** + * Job description for all angeltypes (public to everyone) + */ +function angeltypes_about_controller() { + global $privileges, $user; + + $angeltypes = AngelTypes(); + if ($angeltypes === false) + engelsystem_error("Unable to load angeltypes."); + + return array( + _("Teams/Engeltypes description"), + AngelTypes_about_view($angeltypes) + ); +} + +/** * Delete an Angeltype. */ function angeltype_delete_controller() { @@ -139,6 +158,9 @@ function angeltype_edit_controller() { function angeltype_controller() { global $privileges, $user; + if (! in_array('angeltypes', $privileges)) + redirect('?'); + if (! isset($_REQUEST['angeltype_id'])) redirect(page_link_to('angeltypes')); @@ -168,6 +190,9 @@ function angeltype_controller() { function angeltypes_list_controller() { global $privileges, $user; + if (! in_array('angeltypes', $privileges)) + redirect('?'); + $angeltypes = AngelTypes_with_user($user); if ($angeltypes === false) engelsystem_error("Unable to load angeltypes."); |