$r->_db_revoke($cookh);
$r->_db_revoke($parmh);
return ({ Kind => 'REDIRECT-LOGGEDOUT',
- Message => "Logging out...",
+ Message => $r->_gt("Logging out..."),
CookieSecret => '',
Params => { } });
}
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 => { } });
}
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',
- 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 => { } })
}
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',
- Message => "Logging in...",
+ Message => $r->_gt("Logging in..."),
CookieSecret => $cooks,
Params => $r->chain_params() });
}
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',
- Message => "You need to log in.",
+ Message => $r->_gt("You need to log in."),
CookieSecret => $news,
Params => { } });
}
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!
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->_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->_gt($divert->{Message});
+ push @body, $divert->{Message};
push @body, $r->_ch('gen_postmainpage_form', $params);
} else {
die $kind;