summaryrefslogtreecommitdiff
path: root/plugins/FBConnect/FBConnectPlugin.php
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-06-14 16:17:22 +0800
committerJeffery To <jeffery.to@gmail.com>2009-06-14 16:17:22 +0800
commit6d308f6ffe3f894c60fafaea3ceaef86d30dfe1d (patch)
tree8cea1b246bfb704c76d67e519d4ce3b0fccf5844 /plugins/FBConnect/FBConnectPlugin.php
parent77c94c44a622052366dcc03fee522232672d71d9 (diff)
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.
Diffstat (limited to 'plugins/FBConnect/FBConnectPlugin.php')
-rw-r--r--plugins/FBConnect/FBConnectPlugin.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php
index a366985be..11dc568a9 100644
--- a/plugins/FBConnect/FBConnectPlugin.php
+++ b/plugins/FBConnect/FBConnectPlugin.php
@@ -200,11 +200,13 @@ class FBConnectPlugin extends Plugin
$action->menuItem(common_local_url('smssettings'),
_('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
}
- $action->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')) {
+ $action->menuItem(common_local_url('invite'),
+ _('Invite'),
+ sprintf(_('Invite friends and colleagues to join you on %s'),
+ common_config('site', 'name')),
+ false, 'nav_invitecontact');
+ }
// Need to override the Logout link to make it do FB stuff
if ($flink && $fbuid > 0) {