aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-03-02 16:35:16 -0400
committerJoey Hess <joeyh@joeyh.name>2016-03-02 16:35:16 -0400
commit8d28f70b374d8291e5da94265ced333a801498b4 (patch)
treee476e9827b21e039459c3d5c4eb639f28e4b9d63 /IkiWiki
parentf50199467899f29e94572c581e07779c1d7ff8b3 (diff)
downloadikiwiki-8d28f70b374d8291e5da94265ced333a801498b4.tar
ikiwiki-8d28f70b374d8291e5da94265ced333a801498b4.tar.gz
loginselector: When only openid and emailauth are enabled, but passwordauth is not, avoid showing a "Other" box which opens an empty form.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/loginselector.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/loginselector.pm b/IkiWiki/Plugin/loginselector.pm
index 26c80b4ce..17539ce8a 100644
--- a/IkiWiki/Plugin/loginselector.pm
+++ b/IkiWiki/Plugin/loginselector.pm
@@ -94,7 +94,6 @@ sub checkconfig () {
my $real_cgi_signin;
my $otherform_label=gettext("Other");
if (keys %{$IkiWiki::hooks{auth}} > 1) {
- $real_cgi_signin=\&IkiWiki::cgi_signin;
# Special case to avoid labeling password auth as
# "Other" when it's the only auth plugin not
# integrated with the loginselector.
@@ -106,6 +105,9 @@ sub checkconfig () {
if (keys %h == 1 && exists $h{passwordauth}) {
$otherform_label=gettext("Password");
}
+ if (keys %h > 0) {
+ $real_cgi_signin=\&IkiWiki::cgi_signin;
+ }
}
inject(name => "IkiWiki::cgi_signin", call => sub ($$) {
login_selector($real_cgi_signin, $otherform_label, @_);