diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm 2020-04-14 16:50:36.000000000 +0400 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm 2020-05-08 15:36:16.518000000 +0400 @@ -24,14 +24,6 @@ my $oldTheme = $c->session->{CurrentTheme}; if ( $theme ne $oldTheme ) { -# $c->app->renderer->paths([$c->app->home->rel_file('themes/default/templates')]); -# $c->app->static->paths([$c->app->home->rel_file('themes/default/public')]); -# if ( $theme ne 'default' ) { -# # Put the new theme first -# my $t_path = $c->app->home->rel_file('themes/'.$theme); -# unshift @{$c->app->renderer->paths}, $t_path.'/templates' if -d $t_path.'/templates'; -# unshift @{$c->app->static->paths}, $t_path.'/public' if -d $t_path.'/public'; -# } $c->session->{CurrentTheme} = $theme; $db->get('manager2')->set_prop('Theme', $theme); @@ -40,6 +32,8 @@ } $from = '/initial' if $from eq '/'; + $from = '/' . $from if ( $from !~ m|^\/| ); + $c->redirect_to( $from); } diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Useraccounts.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Useraccounts.pm --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Useraccounts.pm 2020-04-14 16:50:36.000000000 +0400 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Useraccounts.pm 2020-05-08 11:37:04.281000000 +0400 @@ -543,7 +543,7 @@ my ($c, $acctName) = @_; unless ($adb->validate_account_name($acctName)) { - return $c->l('usrACCT_NAME_HAS_INVALID_CHARS', $acctName); + return $c->l('usr_ACCT_NAME_HAS_INVALID_CHARS', $acctName); } return "OK"; } @@ -557,7 +557,7 @@ ? $cdb->get('maxAcctNameLength')->prop('type') : "") || 12; if ( length $acctName > $maxAcctNameLength ) { - return $c->l('usrACCOUNT_TOO_LONG', $maxAcctNameLength); + return $c->l('usr_ACCOUNT_TOO_LONG', $maxAcctNameLength); } else { return ('OK'); } @@ -578,7 +578,7 @@ } else { return('OK'); } - return $c->l('usrACCOUNT_CONFLICT', $acctName, $type); + return $c->l('usr_ACCOUNT_CONFLICT', $acctName, $type); } diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm 2020-04-25 13:19:29.000000000 +0400 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm 2020-05-08 11:29:29.737000000 +0400 @@ -280,39 +280,27 @@ my $c = shift; my $lang = shift || ''; - #sub lg_sp { - #app->log->info("hook_b_r->panel route. lang: $lang namespace: $moduleLong ldir; $I18Ndir"); - #$c->languages( $lang ) if ( defined $lang ); - #$c->i18ns( $moduleLong ); - #return 0; - #} - my $panel = $c->tx->req->url; $panel = '/initial' if ($panel eq ''); - (my $module = $panel) =~ s|/||; + (my $module = $panel) =~ s|\?.*$||; $module = ucfirst($module); my $moduleLong = "SrvMngr::I18N::Modules::$module"; (my $dir = $moduleLong) =~ s|::|/|g; my $I18Ndir = app->home->rel_file('lib/') . '/' . $dir; - app->log->info("$module $moduleLong $I18Ndir"); +# app->log->info("$panel $module $moduleLong $I18Ndir"); + if ( ! -d $I18Ndir ) { + ( $moduleLong = $moduleLong) =~ s/.$//; + ( $I18Ndir = $I18Ndir) =~ s/.$//; + } if ( -d $I18Ndir ) { - app->log->info("hook_b_r->panel route. lang: $lang namespace: $moduleLong ldir; $I18Ndir"); - $c->languages( $lang ) if ( defined $lang ); +# app->log->info("hook_b_r->panel route. lang: $lang namespace: $moduleLong ldir; $I18Ndir"); + $c->languages( $lang ) if ( defined $lang ); $c->i18ns( $moduleLong ); - #lg_sp(); } else { - ( $moduleLong = $moduleLong) =~ s/.$//; - ( $I18Ndir = $I18Ndir) =~ s/.$//; - if ( -d $I18Ndir ) { - app->log->info("hook_b_r->panel route. lang: $lang namespace: $moduleLong ldir; $I18Ndir"); - $c->languages( $lang ) if ( defined $lang ); - $c->i18ns( $moduleLong ); - } else { - warn "Locale lexicon missing for $module \n"; - } + warn "Locale lexicon missing for $module \n"; } }; diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl 2020-04-27 10:47:14.000000000 +0400 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl 2020-05-08 11:26:09.081000000 +0400 @@ -153,6 +153,8 @@ $r->get('/support')->to('support#main')->name('support'); +$r->post('/swttheme')->to('swttheme#main')->name('swtheme'); + $r->get('/useraccounts')->to('useraccounts#main')->name('useraccounts'); $r->post('/useraccounts')->to('useraccounts#do_display')->name('useraccountadd'); $r->get('/useraccountd')->to('useraccounts#do_display')->name('useraccountdis');