summaryrefslogtreecommitdiff
path: root/lib/JWebmail
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de>2022-04-25 17:13:23 +0200
committerJannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de>2022-04-25 17:13:23 +0200
commiteae7431ea9ee9d87634b3938b5cf8b64ebdbfb5a (patch)
tree1d323e5106f5b1eb16a045592ab1bd9d22b6b0e3 /lib/JWebmail
parenta97f1a5eb6649e93bfd6584ed590e37c1290755f (diff)
corrections for last commit
- fixed tests - added links to languages in about - raised log level of actions in I18N2 - improved actions script - corrected dependencies in Makefile.PL - updated changes
Diffstat (limited to 'lib/JWebmail')
-rw-r--r--lib/JWebmail/Controller/Webmail.pm2
-rw-r--r--lib/JWebmail/Model/ReadMails/MockJSON.pm6
-rw-r--r--lib/JWebmail/Plugin/I18N2.pm6
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/JWebmail/Controller/Webmail.pm b/lib/JWebmail/Controller/Webmail.pm
index 3566c83..6e3ff8b 100644
--- a/lib/JWebmail/Controller/Webmail.pm
+++ b/lib/JWebmail/Controller/Webmail.pm
@@ -60,13 +60,13 @@ sub login {
my $user = $v->required('userid')->size(4, 50)->param;
my $passwd = $v->required('password')->size(4, 50)->like(qr/^.+$/)->param; # no new-lines
- my $auth = $self->users->Auth(user => $user, password => $passwd);
if ($v->has_error) {
$self->res->code(400);
return $self->render(action => 'noaction');
}
+ my $auth = $self->users->Auth(user => $user, password => $passwd);
my $valid = _time { $self->users->verify_user($auth) } $self, 'verify user';
if ($valid) {
diff --git a/lib/JWebmail/Model/ReadMails/MockJSON.pm b/lib/JWebmail/Model/ReadMails/MockJSON.pm
index bb105d1..8918040 100644
--- a/lib/JWebmail/Model/ReadMails/MockJSON.pm
+++ b/lib/JWebmail/Model/ReadMails/MockJSON.pm
@@ -6,17 +6,17 @@ use utf8;
use List::Util 'sum';
+use Mojo::JSON qw(decode_json);
+
use Role::Tiny::With;
-use Mojo::JSON qw(decode_json);
+use namespace::clean;
use constant {
VALID_USER => 'mockjson@example.com',
VALID_PW => 'vwxyz',
};
-use namespace::clean;
-
with 'JWebmail::Model::ReadMails::Role';
diff --git a/lib/JWebmail/Plugin/I18N2.pm b/lib/JWebmail/Plugin/I18N2.pm
index 35367e9..c951eec 100644
--- a/lib/JWebmail/Plugin/I18N2.pm
+++ b/lib/JWebmail/Plugin/I18N2.pm
@@ -93,7 +93,7 @@ package JWebmail::Plugin::I18N2::Match {
if (my $lang = $self->_i18n2_stash->{lang}) {
@args = __add_option_no_override(lang => $lang, @args);
}
- return $self->SUPER::path_for(@args);
+ return $self->next::method(@args);
}
}
@@ -118,7 +118,7 @@ sub register {
{
local $" = ',';
- $i18n_log->debug("loaded languages (@{[$t->languages]})");
+ $i18n_log->info("loaded languages (@{[$t->languages]})");
if (keys $conf->{languages}->%* > $t->languages) {
$i18n_log->warn("missing languages");
@@ -137,7 +137,7 @@ sub register {
my $res = $t->translate($lang, $word);
unless ($res) {
local $" = ' ';
- $app->log->warn('[' . __PACKAGE__ . "] missing translation for '$lang':'$word' @{[ caller(1) ]}[0..2]");
+ $app->log->warn('[' . __PACKAGE__ . "] missing translation for $lang:'$word' @{[ caller(1) ]}[0..2]");
}
return $res;
});