Merge branch 'master' of github.com:webmin/webmin

This commit is contained in:
Jamie Cameron
2023-06-23 23:24:14 -07:00
6 changed files with 39 additions and 21 deletions

View File

@@ -147,8 +147,8 @@ master_defttl=Default time-to-live for records
master_edefttl='$1' is not a valid default time-to-live for records
master_esoagone=No SOA record found!
master_einclude=Additional template file does not exist
master_vmin=WARNING! This zone is managed by Virtualmin. Records should be edited using the Virtualmin UI, to ensure they are consistent with other virtual server settings.
master_vminalias=DANGER! This zone is an alias of a Virtualmin domain, which is kept in sync with it's target. Records should never be edited here, as any changes will be overwritten!
master_vmin=This zone is managed by Virtualmin. Records should be edited using the Virtualmin UI, to ensure they are consistent with other virtual server settings.
master_vminalias=This zone is an alias of a Virtualmin domain, which is kept in sync with it's target. Records should never be edited here, as any changes will be overwritten!
delete_title=Delete Zone
delete_mesg=Are you sure you want to delete the zone $1 ? All records and the zone file will be deleted.

View File

@@ -2848,10 +2848,23 @@ sub iframe_body
{
my ($body) = @_;
# Do we have theme styles to embed when
# viewing an email? It can be useful for
# themes with dark palettes
my $iframe_theme_file = sub {
my $f =
"$root_directory/$current_theme/unauthenticated/css/_iframe/$_[0].min.css";
return -r $f ? &read_file_contents($f) : '';
};
my $iframe_styles_theme =
&$iframe_theme_file($ENV{'HTTP_X_COLOR_PALETTE_FILE'}) ||
&$iframe_theme_file('quote');
# Mail iframe inner styles
my $iframe_styles = <<EOF;
<style>
html, body { overflow-y: hidden; }
$iframe_styles_theme
</style>
EOF
# Add inner styles to the email body
@@ -2958,6 +2971,7 @@ my $iframe_theme_file = sub {
return -r $f ? &read_file_contents($f) : '';
};
my $iframe_styles_theme =
&$iframe_theme_file($ENV{'HTTP_X_COLOR_PALETTE_FILE'}) ||
&$iframe_theme_file('quote');
# Quote mail iframe inner styles

View File

@@ -451,21 +451,21 @@ my $iframe_quote;
$iframe_quote = &iframe_quote($quote)
if (!$in{'new'});
# Get HTML editor and replies
my $html_editor = &html_editor(
{ textarea =>
{ target => { name => 'body', attr => 'name' },
sync =>
{ position => 'after',
data => [ { iframe => '#quote-mail-iframe',
elements => ['#webmin-iframe-quote'] } ] }
},
type => $config{'html_edit_mode'} || 'simple',
after =>
{ editor => $iframe_quote }
});
if ($html_edit) {
# Get HTML editor and replies
my $html_editor = &html_editor(
{ textarea =>
{ target => { name => 'body', attr => 'name' },
sync =>
{ position => 'after',
data => [ { iframe => '#quote-mail-iframe',
elements => ['#webmin-iframe-quote'] } ] }
},
type => $config{'html_edit_mode'} || 'simple',
after =>
{ editor => $iframe_quote }
});
$sig =~ s/\n/<br>/g,
$sig =~ s/^\s+//g,
$sig = "<br><br>$sig<br><br>"

View File

@@ -341,8 +341,9 @@ if (!$ver) {
$variant = "mysql";
}
my $vn = $variant eq "mysql" ? "MySQL" : "MariaDB";
my $cmd = $variant ne "mysql" && $ver >= 11 ? 'mariadb' : 'mysql';
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
&help_search_link("mysql", "man", "doc", "google"),
&help_search_link($cmd, "man", "doc", "google"),
undef, undef,
$config{'host'} ?
&text('index_version2', $ver, $config{'host'}, $vn) :

View File

@@ -820,7 +820,7 @@ ${$_[0]} = $out if ($_[0]);
if ($out =~ /lib\S+\.so/) {
return -1;
}
elsif ($out =~ /(distrib|Ver)\s+((3|4|5|6|7|8|9|10)\.[0-9\.]*(\-[a-z0-9]+)?)/i) {
elsif ($out =~ /(distrib|Ver|from)\s+((3|4|5|6|7|8|9|10|11)\.[0-9\.]*(\-[a-z0-9]+)?)/i) {
return $2;
}
else {

View File

@@ -406,14 +406,17 @@ else {
system("/bin/rm -rf ".
quotemeta($tmp_dir));
}
mkdir($tmp_dir, 0755) || (($mkdirerr = $!), next);
chown($<, $(, $tmp_dir);
chmod(0755, $tmp_dir);
# Directory may exist but has wrong permissions
if (!-d $tmp_dir) {
mkdir($tmp_dir, 0755) || (($mkdirerr = $!), next);
}
chown($<, $(, $tmp_dir) || (($mkdirerr = $!), next);
chmod(0755, $tmp_dir) || (($mkdirerr = $!), next);
}
if ($tries >= 10) {
my @st = lstat($tmp_dir);
$mkdirerr = $mkdirerr ? " : $mkdirerr" : "";
&error("Failed to create temp directory ".
&error("Failed to setup temp directory ".
$tmp_dir.$mkdirerr);
}
}