diff --git a/authentic-lib.pl b/authentic-lib.pl
index 77380bd9d..202649114 100644
--- a/authentic-lib.pl
+++ b/authentic-lib.pl
@@ -510,7 +510,7 @@ sub print_sysstats_panel_start
sub print_sysstats_table
{
- my ($data, $quota, $prod) = @_;
+ my ($data, $quota) = @_;
if ((defined($data) && scalar(@{$data})) ||
(defined($quota) && scalar(@{$quota})))
@@ -518,14 +518,7 @@ sub print_sysstats_table
print '
' . "\n";
if (defined($data) && scalar(@{$data})) {
foreach my $t (@{ @{$data}[0]->{'table'} }) {
- my $insert = ($t->{"desc"} =~ /\Q$prod/i);
- if ($insert && $get_user_level ne '3') {
- print_table_row($theme_text{'body_webmin'}, get_webmin_version());
- }
print_table_row($t->{"desc"}, $t->{"value"});
- if ($insert) {
- print_table_row($theme_text{'theme_version'}, get_theme_user_link());
- }
}
}
if (defined($quota) && scalar(@{$quota})) {
diff --git a/sysinfo.cgi b/sysinfo.cgi
index cd0ccd886..2cb2729ce 100755
--- a/sysinfo.cgi
+++ b/sysinfo.cgi
@@ -206,10 +206,23 @@ if ($get_user_level ne '3') {
my @mailbox = grep {$_->{'module'} eq 'mailbox'} @info;
my @quota = grep {$_->{'module'} eq 'quota'} @info;
- my $prod = &get_product_name();
-
+ # Handle theme link if allowed
+ if (!defined($gconfig{'ui_show'}) || $gconfig{'ui_show'} =~ /\btver\b/) {
+ my $link =
+ { desc => $theme_text{theme_version}, value => get_theme_user_link() };
+ foreach my $item (@mailbox) {
+ for (my $i = 0; $i < @{$item->{'table'}}; $i++) {
+ if ($item->{'table'}->[$i]->{'type'} =~ /^(version|time)$/) {
+ splice(@{$item->{'table'}}, $i + ($1 eq 'time' ? -1 : 1), 0, $link);
+ undef($link);
+ last;
+ }
+ }
+ }
+ push(@{$mailbox[0]->{'table'}}, $link) if ($link);
+ }
print_sysstats_panel_start();
- print_sysstats_table(\@mailbox, \@quota, $prod);
+ print_sysstats_table(\@mailbox, \@quota);
print_sysstats_panel_end();
# Common modules