summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-06-30 16:10:12 -0700
committerZach Copley <zach@controlyourself.ca>2009-06-30 16:10:12 -0700
commitb10dba27982a94d73fb7f8d70cae611241871706 (patch)
treefb99c85c9db49a53f49e71617aaad795fec700f2 /lib
parent190d45cd05a1affbc8d0db50a487b5081f6a34cb (diff)
parent925b3f32eae5c6528bfe332317092f08aabc6508 (diff)
Merge commit 'jeff-themovie/invite-enabled' into 0.8.x
* commit 'jeff-themovie/invite-enabled': Adds $config['invite']['enabled'] to enable/disable invites.
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php12
-rw-r--r--lib/common.php2
-rw-r--r--lib/facebookaction.php14
-rw-r--r--lib/subgroupnav.php2
4 files changed, 18 insertions, 12 deletions
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');
}
diff --git a/lib/common.php b/lib/common.php
index e2936f075..e10f24b3b 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -175,6 +175,8 @@ $config =
'host' => null, # only set if != server
'debug' => false, # print extra debug info
'public' => array()), # JIDs of users who want to receive the public stream
+ 'invite' =>
+ array('enabled' => true),
'sphinx' =>
array('enabled' => false,
'server' => 'localhost',
diff --git a/lib/facebookaction.php b/lib/facebookaction.php
index a445750f7..1ae90d53b 100644
--- a/lib/facebookaction.php
+++ b/lib/facebookaction.php
@@ -213,12 +213,14 @@ class FacebookAction extends Action
array('href' => 'index.php', 'title' => _('Home')), _('Home'));
$this->elementEnd('li');
- $this->elementStart('li',
- array('class' =>
- ($this->action == 'facebookinvite') ? 'current' : 'facebook_invite'));
- $this->element('a',
- array('href' => 'invite.php', 'title' => _('Invite')), _('Invite'));
- $this->elementEnd('li');
+ if (common_config('invite', 'enabled')) {
+ $this->elementStart('li',
+ array('class' =>
+ ($this->action == 'facebookinvite') ? 'current' : 'facebook_invite'));
+ $this->element('a',
+ array('href' => 'invite.php', 'title' => _('Invite')), _('Invite'));
+ $this->elementEnd('li');
+ }
$this->elementStart('li',
array('class' =>
diff --git a/lib/subgroupnav.php b/lib/subgroupnav.php
index 4a9b36ae8..520991923 100644
--- a/lib/subgroupnav.php
+++ b/lib/subgroupnav.php
@@ -100,7 +100,7 @@ class SubGroupNav extends Widget
$this->user->nickname),
$action == 'usergroups',
'nav_usergroups');
- if (!is_null($cur) && $this->user->id === $cur->id) {
+ if (common_config('invite', 'enabled') && !is_null($cur) && $this->user->id === $cur->id) {
$this->out->menuItem(common_local_url('invite'),
_('Invite'),
sprintf(_('Invite friends and colleagues to join you on %s'),