diff options
author | Sem <sembrestels@riseup.net> | 2012-08-04 01:50:01 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-08-04 01:50:01 +0200 |
commit | 18df06b9cd34c62dd8e9b1dfffd2f75e2815d859 (patch) | |
tree | e880bce8a7b10a6b3bc8c60168bc5ab35acf40f8 /mod/groups/lib | |
parent | 71edfd80a0baf95b86a29547252b01973511828f (diff) | |
parent | 4dd2ca9d54b64ebbf5eba3e3036f747cadb40825 (diff) | |
download | elgg-18df06b9cd34c62dd8e9b1dfffd2f75e2815d859.tar.gz elgg-18df06b9cd34c62dd8e9b1dfffd2f75e2815d859.tar.bz2 |
Merge branch 'translations-fallback-js' of git://github.com/sembrestels/Elgg into lorea-preprod
Conflicts:
mod/developers/views/default/theme_preview/grid.php
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); |