chiark
/
gitweb
/
~ian
/
cgi-auth-flexible.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e7cf0a4
)
$divert->Message is already translated
author
Ian Jackson
<ian.jackson@eu.citrix.com>
Tue, 15 Jan 2013 17:16:07 +0000
(17:16 +0000)
committer
Ian Jackson
<Ian.Jackson@eu.citrix.com>
Tue, 15 Jan 2013 17:16:07 +0000
(17:16 +0000)
cgi-auth-flexible.pm
patch
|
blob
|
history
diff --git
a/cgi-auth-flexible.pm
b/cgi-auth-flexible.pm
index 6ad45b1098429d384a7c620cca9be06e9ead4cf3..61955c90fe26ec497af1bedf19fdb91b2dcaa5ee 100644
(file)
--- a/
cgi-auth-flexible.pm
+++ b/
cgi-auth-flexible.pm
@@
-507,7
+507,7
@@
sub _check_divert_core ($) {
$r->_db_revoke($cookh);
$r->_db_revoke($parmh);
return ({ Kind => 'REDIRECT-LOGGEDOUT',
$r->_db_revoke($cookh);
$r->_db_revoke($parmh);
return ({ Kind => 'REDIRECT-LOGGEDOUT',
- Message =>
"Logging out..."
,
+ Message =>
$r->_gt("Logging out...")
,
CookieSecret => '',
Params => { } });
}
CookieSecret => '',
Params => { } });
}
@@
-516,7
+516,7
@@
sub _check_divert_core ($) {
die unless $cookt;
die unless $parmt;
return ({ Kind => 'SMALLPAGE-LOGGEDOUT',
die unless $cookt;
die unless $parmt;
return ({ Kind => 'SMALLPAGE-LOGGEDOUT',
- Message =>
"You have been logged out."
,
+ Message =>
$r->_gt("You have been logged out.")
,
CookieSecret => '',
Params => { } });
}
CookieSecret => '',
Params => { } });
}
@@
-525,15
+525,17
@@
sub _check_divert_core ($) {
die unless $parmt;
if (!$cookt && $parmt eq 't') {
return ({ Kind => 'SMALLPAGE-NOCOOKIE',
die unless $parmt;
if (!$cookt && $parmt eq 't') {
return ({ Kind => 'SMALLPAGE-NOCOOKIE',
- Message => "You do not seem to have cookies enabled. ".
- "You must enable cookies as we use them for login.",
+ Message => $r->_gt("You do not seem to have cookies".
+ " enabled. You must enable cookies".
+ " as we use them for login."),
CookieSecret => $r->_fresh_secret(),
Params => $r->chain_params() })
}
if (!$cookt || $cookt eq 'n' || $cookh ne $parmh) {
$r->_db_revoke($cookh);
return ({ Kind => 'LOGIN-STALE',
CookieSecret => $r->_fresh_secret(),
Params => $r->chain_params() })
}
if (!$cookt || $cookt eq 'n' || $cookh ne $parmh) {
$r->_db_revoke($cookh);
return ({ Kind => 'LOGIN-STALE',
- Message => "Stale session; you need to log in again.",
+ Message => $r->_gt("Stale session;".
+ " you need to log in again."),
CookieSecret => $r->_fresh_secret(),
Params => { } })
}
CookieSecret => $r->_fresh_secret(),
Params => { } })
}
@@
-541,13
+543,13
@@
sub _check_divert_core ($) {
my $username = $r->_ch('login_ok');
unless (defined $username && length $username) {
return ({ Kind => 'LOGIN-BAD',
my $username = $r->_ch('login_ok');
unless (defined $username && length $username) {
return ({ Kind => 'LOGIN-BAD',
- Message =>
"Incorrect username/password."
,
+ Message =>
$r->_gt("Incorrect username/password.")
,
CookieSecret => $cooks,
Params => $r->chain_params() })
}
$r->_db_record_login_ok($parmh,$username);
return ({ Kind => 'REDIRECT-LOGGEDIN',
CookieSecret => $cooks,
Params => $r->chain_params() })
}
$r->_db_record_login_ok($parmh,$username);
return ({ Kind => 'REDIRECT-LOGGEDIN',
- Message =>
"Logging in..."
,
+ Message =>
$r->_gt("Logging in...")
,
CookieSecret => $cooks,
Params => $r->chain_params() });
}
CookieSecret => $cooks,
Params => $r->chain_params() });
}
@@
-567,13
+569,13
@@
sub _check_divert_core ($) {
my $news = $r->_fresh_secret();
if ($meth eq 'GET') {
return ({ Kind => 'LOGIN-INCOMINGLINK',
my $news = $r->_fresh_secret();
if ($meth eq 'GET') {
return ({ Kind => 'LOGIN-INCOMINGLINK',
- Message =>
"You need to log in."
,
+ Message =>
$r->_gt("You need to log in.")
,
CookieSecret => $news,
Params => $r->chain_params() });
} else {
$r->_db_revoke($parmh);
return ({ Kind => 'LOGIN-FRESH',
CookieSecret => $news,
Params => $r->chain_params() });
} else {
$r->_db_revoke($parmh);
return ({ Kind => 'LOGIN-FRESH',
- Message =>
"You need to log in."
,
+ Message =>
$r->_gt("You need to log in.")
,
CookieSecret => $news,
Params => { } });
}
CookieSecret => $news,
Params => { } });
}
@@
-582,7
+584,7
@@
sub _check_divert_core ($) {
if (!$r->{S}{promise_check_mutate}) {
if ($meth ne 'POST') {
return ({ Kind => 'MAINPAGEONLY',
if (!$r->{S}{promise_check_mutate}) {
if ($meth ne 'POST') {
return ({ Kind => 'MAINPAGEONLY',
- Message =>
'Entering via cross-site link.'
,
+ Message =>
$r->_gt('Entering via cross-site link.')
,
CookieSecret => $cooks,
Params => { } });
# NB caller must then ignore params & path!
CookieSecret => $cooks,
Params => { } });
# NB caller must then ignore params & path!
@@
-779,15
+781,15
@@
sub check_ok ($) {
my ($title, @body);
if ($kind =~ m/^LOGIN-/) {
$title = $r->_gt('Login');
my ($title, @body);
if ($kind =~ m/^LOGIN-/) {
$title = $r->_gt('Login');
- push @body, $
r->_gt($divert->{Message})
;
+ push @body, $
divert->{Message}
;
push @body, $r->_ch('gen_login_form', $params);
} elsif ($kind =~ m/^SMALLPAGE-/) {
$title = $r->_gt('Not logged in');
push @body, $r->_ch('gen_login_form', $params);
} elsif ($kind =~ m/^SMALLPAGE-/) {
$title = $r->_gt('Not logged in');
- push @body, $
r->_gt($divert->{Message})
;
+ push @body, $
divert->{Message}
;
push @body, $r->_ch('gen_login_link', $params);
} elsif ($kind =~ m/^MAINPAGEONLY$/) {
$title = $r->_gt('Entering secure site.');
push @body, $r->_ch('gen_login_link', $params);
} elsif ($kind =~ m/^MAINPAGEONLY$/) {
$title = $r->_gt('Entering secure site.');
- push @body, $
r->_gt($divert->{Message})
;
+ push @body, $
divert->{Message}
;
push @body, $r->_ch('gen_postmainpage_form', $params);
} else {
die $kind;
push @body, $r->_ch('gen_postmainpage_form', $params);
} else {
die $kind;