From 6d308f6ffe3f894c60fafaea3ceaef86d30dfe1d Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sun, 14 Jun 2009 16:17:22 +0800 Subject: Adds $config['invite']['enabled'] to enable/disable invites. The invite function may not applicable for private and/or closed installs. This adds a configuration option to enable/disable invites (defaulting to enabled), hides the "Invite" nav item when necessary, and adds a check to actions/invite.php. Note that I haven't tried the Facebook application so I didn't add any checks to actions/facebookinvite.php. --- lib/action.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/action.php') diff --git a/lib/action.php b/lib/action.php index 89a8c8f4d..12d122f12 100644 --- a/lib/action.php +++ b/lib/action.php @@ -422,11 +422,13 @@ class Action extends HTMLOutputter // lawsuit $this->menuItem(common_local_url('smssettings'), _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect'); } - $this->menuItem(common_local_url('invite'), - _('Invite'), - sprintf(_('Invite friends and colleagues to join you on %s'), - common_config('site', 'name')), - false, 'nav_invitecontact'); + if (common_config('invite', 'enabled')) { + $this->menuItem(common_local_url('invite'), + _('Invite'), + sprintf(_('Invite friends and colleagues to join you on %s'), + common_config('site', 'name')), + false, 'nav_invitecontact'); + } $this->menuItem(common_local_url('logout'), _('Logout'), _('Logout from the site'), false, 'nav_logout'); } -- cgit v1.2.3-54-g00ecf