summaryrefslogtreecommitdiff
path: root/actions/public.php
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-08-09 19:12:59 +0800
committerJeffery To <jeffery.to@gmail.com>2009-08-10 13:57:39 +0800
commit14b46e2183f10359cc53d597913a878f53e23719 (patch)
tree5abe41f6f475be0a05168f8859542e1a1a3b3b21 /actions/public.php
parentc1b19929f6234c4b9e30e16bae419c89c38c1169 (diff)
Added configuration option to only allow OpenID logins.
If $config['site']['openidonly'] is set to true: * the Login/Register pages will be removed from the navigation; * directly accesses to the Login/Register pages will redirect to the OpenID login page; * most links to the Login/Register pages will link to the OpenID login page instead. The user will still need to set a password to access the API and RSS feeds.
Diffstat (limited to 'actions/public.php')
-rw-r--r--actions/public.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/actions/public.php b/actions/public.php
index d0317ac70..dd128925b 100644
--- a/actions/public.php
+++ b/actions/public.php
@@ -183,7 +183,8 @@ class PublicAction extends Action
}
else {
if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
- $message .= _('Why not [register an account](%%action.register%%) and be the first to post!');
+ $message .= sprintf(_('Why not [register an account](%%%%action.%s%%%%) and be the first to post!'),
+ (!common_config('site','openidonly')) ? 'register' : 'openidlogin');
}
}
@@ -238,9 +239,11 @@ class PublicAction extends Action
function showAnonymousMessage()
{
if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
- $m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
- 'based on the Free Software [Laconica](http://laconi.ca/) tool. ' .
- '[Join now](%%action.register%%) to share notices about yourself with friends, family, and colleagues! ([Read more](%%doc.help%%))');
+ $m = sprintf(_('This is %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
+ 'based on the Free Software [Laconica](http://laconi.ca/) tool. ' .
+ '[Join now](%%%%action.%s%%%%) to share notices about yourself with friends, family, and colleagues! ' .
+ '([Read more](%%%%doc.help%%%%))'),
+ (!common_config('site','openidonly')) ? 'register' : 'openidlogin');
} else {
$m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
'based on the Free Software [Laconica](http://laconi.ca/) tool.');