From 297ed0dfa160f41ca8ea850dbff30bad886f0c63 Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Thu, 14 Jan 2021 17:29:31 +0300 Subject: [PATCH 1/2] Improve error message formatting based on mode --- web-lib-funcs.pl | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 9bbfd9355..12d1b573e 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -1614,13 +1614,27 @@ elsif ($ENV{'REQUEST_URI'} =~ /json-error=1/) { } else { &header($text{'error'}, ""); - print "
\n"; - print "

",($main::whatfailed ? "$main::whatfailed : " : ""), - @_,"

\n"; + my $hh = $miniserv::page_capture; + print "
\n" if ($hh); + if ($hh) { + print "

",($main::whatfailed ? "$main::whatfailed : " : ""), + @_,"

\n"; + } + else { + print "$text{'error'}: ",($main::whatfailed ? "$main::whatfailed : " : ""), + @_,"

\n"; + } if ($gconfig{'error_stack'}) { # Show call stack - print "

$text{'error_stack'}

\n"; - print "\n"; + print "\n"; + print "
\n"; print " ", " ", "\n"; @@ -1633,7 +1647,7 @@ else { } print "
$text{'error_stack'}
$text{'error_file'}$text{'error_line'}$text{'error_sub'}
\n"; } - print "
\n"; + print "
\n" if ($hh); if ($ENV{'HTTP_REFERER'} && $main::completed_referers_check) { &footer("javascript:history.back()", $text{'error_previous'}); } From 4771396dbc91fb46403b48dd2baa57c31aa898e5 Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Thu, 14 Jan 2021 21:52:47 +0300 Subject: [PATCH 2/2] Fix to add theme upgrades to certain version --- bin/update-devel | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/update-devel b/bin/update-devel index 4250a702b..f36d3c721 100755 --- a/bin/update-devel +++ b/bin/update-devel @@ -15,7 +15,7 @@ use Cwd qw(cwd); my %opt; GetOptions('help|h' => \$opt{'help'}, 'product|p=s' => \$opt{'product'}, - 'theme|t!' => \$opt{'theme'}); + 'theme|p:s' => \$opt{'theme'}); pod2usage(0) if ($opt{'help'} || !$opt{'product'}); # Get current path @@ -38,8 +38,9 @@ if ($p =~ /^webmin$|^usermin$/i) { $path =~ s/webmin/$p/; } my $cmd = "cd $path && ./update-from-repo.sh -force"; - if ($opt{'theme'}) { - $cmd = "cd $path/authentic-theme && ./theme-update.sh -force"; + if (defined($opt{'theme'})) { + my $tver = $opt{'theme'} ? " -release:$opt{'theme'}" : ""; + $cmd = "cd $path/authentic-theme && ./theme-update.sh$tver -force"; } system($cmd); } else {