aboutsummaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-01-25 11:35:41 +0100
committerKevin Jardine <kevinjardine@yahoo.com>2012-01-25 11:35:41 +0100
commit2cef39baed704f34c54221301a214f363d2ce65a (patch)
tree18a26b982ca1ae860e8a288acfd8e954a2975c9a /models
parentaa04adce03438348c52477eacbd611c83d3caf68 (diff)
downloadelgg-2cef39baed704f34c54221301a214f363d2ce65a.tar.gz
elgg-2cef39baed704f34c54221301a214f363d2ce65a.tar.bz2
reactivated add_users and add_users_notify settings (both off by default)
Diffstat (limited to 'models')
-rw-r--r--models/model.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/models/model.php b/models/model.php
index 65a9215af..90f20fba3 100644
--- a/models/model.php
+++ b/models/model.php
@@ -1548,6 +1548,13 @@ function event_calendar_get_page_content_manage_users($event_guid) {
$event = get_entity($event_guid);
$limit = 10;
$offset = get_input('offset', 0);
+
+ $event_calendar_add_users = elgg_get_plugin_setting('add_users', 'event_calendar');
+ if ($event_calendar_add_users != 'yes') {
+ register_error(elgg_echo('event_calendar:feature_not_activated'));
+ forward();
+ exit;
+ }
if (!elgg_instanceof($event, 'object', 'event_calendar')) {
$content = elgg_echo('event_calendar:error_nosuchevent');
@@ -1658,10 +1665,13 @@ function event_calendar_handle_menu($event_guid) {
elgg_register_menu_item('page', $item);
//add_submenu_item(elgg_echo('event_calendar:review_requests_title'), $CONFIG->wwwroot . "pg/event_calendar/review_requests/".$event_id, '0eventcalendaradmin');
}
- $url = "event_calendar/manage_users/$event_guid";
- $item = new ElggMenuItem('event-calendar-1manage_users', elgg_echo('event_calendar:manage_users:breadcrumb'), $url);
- $item->setSection('event_calendar');
- elgg_register_menu_item('page', $item);
+ $event_calendar_add_users = elgg_get_plugin_setting('add_users', 'event_calendar');
+ if ($event_calendar_add_users == 'yes') {
+ $url = "event_calendar/manage_users/$event_guid";
+ $item = new ElggMenuItem('event-calendar-1manage_users', elgg_echo('event_calendar:manage_users:breadcrumb'), $url);
+ $item->setSection('event_calendar');
+ elgg_register_menu_item('page', $item);
+ }
}
function event_calendar_get_secret_key() {
$key_file_name = elgg_get_plugin_setting('ical_auth_file_name','event_calendar');