diff options
author | Jeffery To <jeffery.to@gmail.com> | 2009-06-14 16:17:22 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2009-06-14 16:17:22 +0800 |
commit | 6d308f6ffe3f894c60fafaea3ceaef86d30dfe1d (patch) | |
tree | 8cea1b246bfb704c76d67e519d4ce3b0fccf5844 /lib/facebookaction.php | |
parent | 77c94c44a622052366dcc03fee522232672d71d9 (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 'lib/facebookaction.php')
-rw-r--r-- | lib/facebookaction.php | 14 |
1 files changed, 8 insertions, 6 deletions
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' => |