diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-07-16 19:20:35 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-07-16 19:20:35 -0700 |
commit | ba8e725dbfead01810edb8619ecd0ec054a75812 (patch) | |
tree | 47892fa8ec3bd8f3f35fa127a0959394860426f2 /mod/groups/lib | |
parent | 6c9b6a031c6d8a8474bc5e7a1717a5ae3bee1535 (diff) | |
parent | 8c0897d92395d897a8e40a2d1b97e5f838520296 (diff) | |
download | elgg-ba8e725dbfead01810edb8619ecd0ec054a75812.tar.gz elgg-ba8e725dbfead01810edb8619ecd0ec054a75812.tar.bz2 |
Merge pull request #306 from sembrestels/limited-groups
Limited groups
Diffstat (limited to 'mod/groups/lib')
-rw-r--r-- | mod/groups/lib/groups.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 51ae89a87..dfbb1154b 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -12,7 +12,9 @@ function groups_handle_all_page() { elgg_pop_breadcrumb(); elgg_push_breadcrumb(elgg_echo('groups')); - elgg_register_title_button(); + if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) { + elgg_register_title_button(); + } $selected_tab = get_input('filter', 'newest'); @@ -184,7 +186,11 @@ function groups_handle_edit_page($page, $guid = 0) { elgg_set_page_owner_guid(elgg_get_logged_in_user_guid()); $title = elgg_echo('groups:add'); elgg_push_breadcrumb($title); - $content = elgg_view('groups/edit'); + if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) { + $content = elgg_view('groups/edit'); + } else { + $content = elgg_echo('groups:cantcreate'); + } } else { $title = elgg_echo("groups:edit"); $group = get_entity($guid); |