Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
nuxwin committed May 30, 2016
1 parent 5831485 commit 56dd992
Show file tree
Hide file tree
Showing 32 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion autoinstaller/Adapter/DebianAdapter.pm
Expand Up @@ -868,7 +868,7 @@ sub _rebuildAndInstallPackage
error( '$pkgSrc parameter is not defined' );
return 1;
}
unless ($patchSysType =~ /^quilt|dpatch$/) {
unless ($patchSysType =~ /^(?:quilt|dpatch)$/) {
error( 'Unsupported patch system.' );
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion autoinstaller/Functions.pm
Expand Up @@ -90,7 +90,7 @@ sub loadConfig
# Merge old config with the new but do not write anything yet.
for my $oldConf(keys %main::imscpOldConfig) {
if (exists $main::imscpConfig{$oldConf}
&& $oldConf !~ /^BuildDate|Version|CodeName|THEME_ASSETS_VERSION|DISTRO_ID|DISTRO_CODENAME|DISTRO_RELEASE$/
&& $oldConf !~ /^(?:BuildDate|Version|CodeName|THEME_ASSETS_VERSION|DISTRO_ID|DISTRO_CODENAME|DISTRO_RELEASE)$/
) {
$main::imscpConfig{$oldConf} = $main::imscpOldConfig{$oldConf};
}
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Modules/Abstract.pm
Expand Up @@ -232,7 +232,7 @@ sub _runAllActions
my @packages = iMSCP::Packages->getInstance()->get();
my $moduleType = $self->getType();

if ($action =~ /^add|restore$/) {
if ($action =~ /^(?:add|restore)$/) {
for('pre', '', 'post') {
my $rs = $self->_runAction( "$_$action$moduleType", \@servers, 'server' );
$rs ||= $self->_runAction( "$_$action$moduleType", \@packages, 'package' );
Expand Down
4 changes: 2 additions & 2 deletions engine/PerlLib/Modules/Alias.pm
Expand Up @@ -350,12 +350,12 @@ sub _getNamedData
USER_NAME => $userName.'als'.$self->{'alias_id'},
MAIL_ENABLED => (
$self->{'mail_on_domain'} || $self->{'domain_mailacc_limit'} >= 0
&& $self->{'external_mail'} =~ /^wildcard|off$/
&& $self->{'external_mail'} =~ /^(?:wildcard|off)$/
) ? 1 : 0,
SPF_RECORDS => [ ]
};

return %{$self->{'named'}} unless $action =~ /add/ && $self->{'external_mail'} =~ /^domain|filter|wildcard$/;
return %{$self->{'named'}} unless $action =~ /add/ && $self->{'external_mail'} =~ /^(?:domain|filter|wildcard)$/;

my $db = iMSCP::Database->factory();
my $rdata = $db->doQuery(
Expand Down
4 changes: 2 additions & 2 deletions engine/PerlLib/Modules/Domain.pm
Expand Up @@ -502,12 +502,12 @@ sub _getNamedData
USER_NAME => $userName,
MAIL_ENABLED => (
$self->{'mail_on_domain'} || $self->{'domain_mailacc_limit'} >= 0 &&
$self->{'external_mail'} =~ /^wildcard|off$/
$self->{'external_mail'} =~ /^(?:wildcard|off)$/
) ? 1 : 0,
SPF_RECORDS => [ ]
};

return %{$self->{'named'}} unless $action =~ /add/ && $self->{'external_mail'} =~ /^domain|filter|wildcard$/;
return %{$self->{'named'}} unless $action =~ /add/ && $self->{'external_mail'} =~ /^(?:domain|filter|wildcard)$/;

my $db = iMSCP::Database->factory();
my $rdata = $db->doQuery(
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Modules/Plugin.pm
Expand Up @@ -364,7 +364,7 @@ sub _call
action => $self->{'action'},
info => $self->{'info'},
config => $self->{'config'},
config_prev => ($self->{'action'} =~ /^change|update$/
config_prev => ($self->{'action'} =~ /^(?:change|update)$/
# On plugin change/update, make sure that prev config also contains any new parameter
? merge( $self->{'config_prev'}, $self->{'config'} )
: $self->{'config_prev'})
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Modules/SubAlias.pm
Expand Up @@ -312,7 +312,7 @@ sub _getNamedData
};

# Only no wildcard MX (NOT LIKE '*.%') must be add to existent subdomains
if ($self->{'external_mail'} =~ /^domain|filter$/) {
if ($self->{'external_mail'} =~ /^(?:domain|filter)$/) {
$self->{'named'}->{'MAIL_ENABLED'} = 1;

my $rdata = iMSCP::Database->factory()->doQuery(
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Modules/Subdomain.pm
Expand Up @@ -302,7 +302,7 @@ sub _getNamedData
USER_NAME => $userName.'sub'.$self->{'subdomain_id'}
};

if ($self->{'external_mail'} =~ /^domain|filter$/) {
if ($self->{'external_mail'} =~ /^(?:domain|filter)$/) {
$self->{'named'}->{'MAIL_ENABLED'} = 1;

# only no wildcard MX (NOT LIKE '*.%') must be add to existent subdomains
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Package/AntiRootkits.pm
Expand Up @@ -81,7 +81,7 @@ sub showDialog
my $packages = [ split ',', main::setupGetQuestion( 'ANTI_ROOTKITS_PACKAGES' ) ];
my $rs = 0;

if ($main::reconfigure =~ /^antirootkits|all|forced$/ || !@{$packages}
if ($main::reconfigure =~ /^(?:antirootkits|all|forced)$/ || !@{$packages}
|| grep { my $__ = $_; !grep $_ eq $__, ( @{$self->{'PACKAGES'}}, 'No' ) } @{$packages}
) {
($rs, $packages) = $dialog->checkbox(
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Package/FileManager.pm
Expand Up @@ -81,7 +81,7 @@ sub showDialog
my $package = main::setupGetQuestion( 'FILEMANAGER_PACKAGE' );
my $rs = 0;

if ($main::reconfigure =~ /^filemanager|all|forced$/
if ($main::reconfigure =~ /^(?:filemanager|all|forced)$/
|| !$package || !grep($_ eq $package, @{$self->{'PACKAGES'}})
) {
($rs, $package) = $dialog->radiolist(
Expand Down
12 changes: 6 additions & 6 deletions engine/PerlLib/Package/FrontEnd/Installer.pm
Expand Up @@ -123,7 +123,7 @@ sub askMasterAdminData

main::setupSetQuestion( 'ADMIN_OLD_LOGIN_NAME', $login );

if ($main::reconfigure =~ /^admin|all|forced$/ || $login eq '') {
if ($main::reconfigure =~ /^(?:admin|all|forced)$/ || $login eq '') {
do {
($rs, $login) = $dialog->inputbox( <<"EOF", $login || 'admin' );
Expand Down Expand Up @@ -215,7 +215,7 @@ sub askDomain
my $options = { domain_private_tld => qr /.*/ };
my ($rs, $msg) = (0, '');

if ($main::reconfigure =~ /^panel|panel_hostname|hostnames|all|forced$/
if ($main::reconfigure =~ /^(?:panel|panel_hostname|hostnames|all|forced)$/
|| split( /\./, $vhost ) < 3 || !is_domain( $vhost, $options )
) {
unless ($vhost) {
Expand Down Expand Up @@ -263,8 +263,8 @@ sub askSsl
my $openSSL = iMSCP::OpenSSL->new();
my $rs = 0;

if ($main::reconfigure =~ /^panel|panel_ssl|ssl|all|forced$/ || $sslEnabled !~ /^yes|no$/
|| ($sslEnabled eq 'yes' && $main::reconfigure =~ /^panel_hostname|hostnames$/)
if ($main::reconfigure =~ /^(?:panel|panel_ssl|ssl|all|forced)$/ || $sslEnabled !~ /^(?:yes|no)$/
|| ($sslEnabled eq 'yes' && $main::reconfigure =~ /^(?:panel_hostname|hostnames)$/)
) {
# Ask for SSL
($rs, $sslEnabled) = $dialog->yesno( <<"EOF", $sslEnabled eq 'no' ? 1 : 0 );
Expand Down Expand Up @@ -415,7 +415,7 @@ sub askHttpPorts
my $ssl = main::setupGetQuestion( 'PANEL_SSL_ENABLED' );
my $rs = 0;

if ($main::reconfigure =~ /^panel|panel_ports|all|forced$/
if ($main::reconfigure =~ /^(?:panel|panel_ports|all|forced)$/
|| $httpPort !~ /^\d+$/ || $httpPort < 1025 || $httpPort > 65535 || $httpsPort eq $httpPort
) {
my $msg = '';
Expand All @@ -432,7 +432,7 @@ EOF
main::setupSetQuestion( 'BASE_SERVER_VHOST_HTTP_PORT', $httpPort ) if $rs < 30;

if ($rs < 30 && $ssl eq 'yes') {
if ($main::reconfigure =~ /^panel|panel_ports|all|forced$/
if ($main::reconfigure =~ /^(?:panel|panel_ports|all|forced)$/
|| $httpsPort !~ /^\d+$/ || $httpsPort < 1025 || $httpsPort > 65535
|| $httpsPort == $httpPort
) {
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Package/PhpMyAdmin/Installer.pm
Expand Up @@ -95,7 +95,7 @@ sub showDialog
my $dbPass = main::setupGetQuestion( 'PHPMYADMIN_SQL_PASSWORD', $self->{'config'}->{'DATABASE_PASSWORD'} );
my ($rs, $msg) = (0, '');

if ($main::reconfigure =~ /^sqlmanager|all|forced$/
if ($main::reconfigure =~ /^(?:sqlmanager|all|forced)$/
|| length $dbUser < 6 || length $dbUser > 16 || $dbUser !~ /^[\x21-\x7e]+$/
|| length $dbPass < 6 || $dbPass !~ /^[\x21-\x7e]+$/
) {
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Package/Webmail.pm
Expand Up @@ -79,7 +79,7 @@ sub showDialog
my $packages = [ split ',', main::setupGetQuestion( 'WEBMAIL_PACKAGES' ) ];
my $rs = 0;

if ($main::reconfigure =~ /^webmails|all|forced$/ || !@{$packages}
if ($main::reconfigure =~ /^(?:webmails|all|forced)$/ || !@{$packages}
|| grep { my $__ = $_; !grep($_ eq $__, ( @{$self->{'PACKAGES'}}, 'No' )) } @{$packages}
) {
($rs, $packages) = $dialog->checkbox(
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Package/Webmail/RainLoop/Installer.pm
Expand Up @@ -73,7 +73,7 @@ sub showDialog
my $dbPass = main::setupGetQuestion( 'RAINLOOP_SQL_PASSWORD', $self->{'rainloop'}->{'config'}->{'DATABASE_PASSWORD'} );
my ($rs, $msg) = (0, '');

if ($main::reconfigure =~ /^webmails|all|forced$/
if ($main::reconfigure =~ /^(?:webmails|all|forced)$/
|| length $dbUser < 6 || length $dbUser > 16 || $dbUser !~ /^[\x23-\x5b\x5d-\x7e\x21]+$/
|| length $dbPass < 6 || $dbPass !~ /^[\x23-\x5b\x5d-\x7e\x21]+$/
) {
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Package/Webmail/Roundcube/Installer.pm
Expand Up @@ -72,7 +72,7 @@ sub showDialog
my $dbPass = main::setupGetQuestion( 'ROUNDCUBE_SQL_PASSWORD', $self->{'config'}->{'DATABASE_PASSWORD'} );
my ($rs, $msg) = (0, '');

if ($main::reconfigure =~ /^webmails|all|forced$/
if ($main::reconfigure =~ /^(?:webmails|all|forced)$/
|| length $dbUser < 6 || length $dbUser > 16 || $dbUser !~ /^[\x21-\x5b\x5d-\x7e]+$/
|| length $dbPass < 6 || $dbPass !~ /^[\x21-\x5b\x5d-\x7e]+$/
) {
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Package/Webstats.pm
Expand Up @@ -83,7 +83,7 @@ sub showDialog
my $packages = [ split ',', main::setupGetQuestion( 'WEBSTATS_PACKAGES' ) ];
my $rs = 0;

if ($main::reconfigure =~ /^webstats|all|forced$/ || !@{$packages}
if ($main::reconfigure =~ /^(?:webstats|all|forced)$/ || !@{$packages}
|| grep { my $__ = $_; !grep($_ eq $__, ( @{$self->{'PACKAGES'}}, 'No' )) } @{$packages}
) {
($rs, $packages) = $dialog->checkbox(
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Package/Webstats/Awstats/Installer.pm
Expand Up @@ -61,7 +61,7 @@ sub showDialog
my $rs = 0;
my $awstatsMode = main::setupGetQuestion( 'AWSTATS_MODE' );

if ($main::reconfigure =~ /^webstats|all|forced$/ || $awstatsMode !~ /^0|1$/) {
if ($main::reconfigure =~ /^(?:webstats|all|forced)$/ || $awstatsMode !~ /^0|1$/) {
($rs, $awstatsMode) = $dialog->radiolist(
"\nPlease select the AWStats mode you want use:", [ 'Dynamic', 'Static' ],
$awstatsMode ? 'Static' : 'Dynamic'
Expand Down
4 changes: 2 additions & 2 deletions engine/PerlLib/Servers/cron/cron.pm
Expand Up @@ -337,12 +337,12 @@ sub _validateCronTask
{
my ($self, $data) = @_;

if ($data->{'MINUTE'} =~ /^@(reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)$/) {
if ($data->{'MINUTE'} =~ /^@(?:reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)$/) {
$data->{'HOUR'} = $data->{'DAY'} = $data->{'MONTH'} = $data->{'DWEEK'} = '';
return undef;
}

for my $attribute(qw/minute hour day month dweek/) {
for my $attribute(qw/ minute hour day month dweek /) {
$self->_validateAttribute( $attribute, $data->{ uc( $attribute ) } );
}

Expand Down
4 changes: 2 additions & 2 deletions engine/PerlLib/Servers/ftpd/proftpd/installer.pm
Expand Up @@ -90,7 +90,7 @@ sub sqlUserDialog

my ($rs, $msg) = (0, '');

if ($main::reconfigure =~ /^ftpd|servers|all|forced$/
if ($main::reconfigure =~ /^(?:ftpd|servers|all|forced)$/
|| length $dbUser < 6 || length $dbUser > 16 || $dbUser !~ /^[\x21-\x7e]+$/
|| length $dbPass < 6 || $dbPass !~ /^[\x21-\x7e]+$/
) {
Expand Down Expand Up @@ -190,7 +190,7 @@ sub passivePortRangeDialog
my ($rs, $msg) = (0, '');
my $passivePortRange = main::setupGetQuestion( 'FTPD_PASSIVE_PORT_RANGE' ) || $self->{'config'}->{'FTPD_PASSIVE_PORT_RANGE'};

if ($main::reconfigure =~ /^ftpd|servers|all|forced$/ || $passivePortRange !~ /^(\d+)\s+(\d+)$/
if ($main::reconfigure =~ /^(?:ftpd|servers|all|forced)$/ || $passivePortRange !~ /^(\d+)\s+(\d+)$/
|| $1 < 32768 || $1 >= 60999 || $1 >= $2
) {
$passivePortRange = '32768 60999' unless $1 && $2;
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Servers/ftpd/vsftpd/installer.pm
Expand Up @@ -91,7 +91,7 @@ sub sqlUserDialog

my ($rs, $msg) = (0, '');

if ($main::reconfigure =~ /^ftpd|servers|all|forced$/
if ($main::reconfigure =~ /^(?:ftpd|servers|all|forced)$/
|| length $dbUser < 6 || length $dbUser > 16 || $dbUser !~ /^[\x21-\x22\x24-\x5b\x5d-\x7e]+$/
|| length $dbPass < 6 || $dbPass !~ /^[\x21-\x22\x24-\x5b\x5d-\x7e]+$/
) {
Expand Down
4 changes: 2 additions & 2 deletions engine/PerlLib/Servers/httpd/apache_fcgid/installer.pm
Expand Up @@ -90,7 +90,7 @@ sub showDialog
my $rs = 0;
my $confLevel = main::setupGetQuestion( 'PHP_CONFIG_LEVEL', $self->{'phpConfig'}->{'PHP_CONFIG_LEVEL'} );

if ($main::reconfigure =~ /^httpd|php|servers|all|forced$/ || $confLevel !~ /^per_(?:site|domain|user)$/) {
if ($main::reconfigure =~ /(^(?:httpd|php|servers|all|forced)$/ || $confLevel !~ /^per_(?:site|domain|user)$/) {
$confLevel =~ s/_/ /;
($rs, $confLevel) = $dialog->radiolist(
<<"EOF", [ 'per_site', 'per_domain', 'per_user' ], $confLevel =~ /^per (?:user|domain)$/ ? $confLevel : 'per site' );
Expand Down Expand Up @@ -408,7 +408,7 @@ sub _buildFastCgiConfFiles
) {
$rs = execute( "$self->{'phpConfig'}->{'PHP_ENMOD_PATH'} $_", \ my $stdout, \ my $stderr );
debug( $stdout ) if $stdout;
unless ($rs =~ /^0|2$/) {
unless ($rs =~ /^(?:0|2)$/) {
error( $stderr ) if $stderr;
return $rs;
}
Expand Down
4 changes: 2 additions & 2 deletions engine/PerlLib/Servers/httpd/apache_itk/installer.pm
Expand Up @@ -90,7 +90,7 @@ sub showDialog
my $rs = 0;
my $confLevel = main::setupGetQuestion( 'PHP_CONFIG_LEVEL', $self->{'phpConfig'}->{'PHP_CONFIG_LEVEL'} );

if ($main::reconfigure =~ /^httpd|php|servers|all|forced$/ || $confLevel !~ /^per_(?:site|domain|user)$/) {
if ($main::reconfigure =~ /^(?:httpd|php|servers|all|forced)$/ || $confLevel !~ /^per_(?:site|domain|user)$/) {
$confLevel =~ s/_/ /;
($rs, $confLevel) = $dialog->radiolist(
<<"EOF", [ 'per_site', 'per_domain', 'per_user' ], $confLevel =~ /^per (?:user|domain)$/ ? $confLevel : 'per site' );
Expand Down Expand Up @@ -386,7 +386,7 @@ sub _buildPhpConfFiles
) {
$rs = execute( "$self->{'phpConfig'}->{'PHP_ENMOD_PATH'} $_", \ my $stdout, \ my $stderr );
debug( $stdout ) if $stdout;
unless ($rs =~ /^0|2$/) {
unless ($rs =~ /^(?:0|2)$/) {
error( $stderr ) if $stderr;
return $rs;
}
Expand Down
6 changes: 3 additions & 3 deletions engine/PerlLib/Servers/httpd/apache_php_fpm/installer.pm
Expand Up @@ -128,8 +128,8 @@ sub showListenModeDialog
my $rs = 0;
my $listenMode = main::setupGetQuestion( 'PHP_FPM_LISTEN_MODE', $self->{'phpConfig'}->{'PHP_FPM_LISTEN_MODE'} );

if ($main::reconfigure =~ /^(?:httpd|php|servers|all|forced)$/ || $listenMode !~ /^uds|tcp$/) {
($rs, $listenMode) = $dialog->radiolist( <<"EOF", [ 'uds', 'tcp' ], $listenMode =~ /^tcp|uds$/ ? $listenMode : 'uds' );
if ($main::reconfigure =~ /^(?:httpd|php|servers|all|forced)$/ || $listenMode !~ /^(?:uds|tcp)$/) {
($rs, $listenMode) = $dialog->radiolist( <<"EOF", [ 'uds', 'tcp' ], $listenMode =~ /^(?:tcp|uds)$/ ? $listenMode : 'uds' );
\\Z4\\Zb\\ZuPHP-FPM - FastCGI address type\\Zn
Expand Down Expand Up @@ -423,7 +423,7 @@ sub _buildFastCgiConfFiles
) {
$rs = execute( "$self->{'phpConfig'}->{'PHP_ENMOD_PATH'} $_", \ my $stdout, \ my $stderr );
debug( $stdout ) if $stdout;
unless ($rs =~ /^0|2$/) {
unless ($rs =~ /^(?:0|2)$/) {
error( $stderr ) if $stderr;
return $rs;
}
Expand Down
10 changes: 5 additions & 5 deletions engine/PerlLib/Servers/named/bind/installer.pm
Expand Up @@ -84,7 +84,7 @@ sub askDnsServerMode
my $dnsServerMode = main::setupGetQuestion( 'BIND_MODE', $self->{'config'}->{'BIND_MODE'} );
my $rs = 0;

if ($main::reconfigure =~ /^named|servers|all|forced$/ || $dnsServerMode !~ /^master|slave$/) {
if ($main::reconfigure =~ /^(?:named|servers|all|forced)$/ || $dnsServerMode !~ /^(?:master|slave)$/) {
($rs, $dnsServerMode) = $dialog->radiolist(
<<"EOF", [ 'master', 'slave' ], $dnsServerMode eq 'slave' ? 'slave' : 'master' );
Expand Down Expand Up @@ -121,7 +121,7 @@ sub askDnsServerIps
my ($rs, $answer, $msg) = (0, '', '');

if ($dnsServerMode eq 'master') {
if ($main::reconfigure =~ /^named|servers|all|forced$/ || "@slaveDnsIps" eq ''
if ($main::reconfigure =~ /^(?:named|servers|all|forced)$/ || "@slaveDnsIps" eq ''
|| "@slaveDnsIps" ne 'no' && !$self->_checkIps( @slaveDnsIps )
) {
($rs, $answer) = $dialog->radiolist(
Expand Down Expand Up @@ -153,7 +153,7 @@ EOF
@slaveDnsIps = ('no');
}
}
} elsif ($main::reconfigure =~ /^named|servers|all|forced$/ || grep($_ eq "@masterDnsIps", ( '', 'no' ))
} elsif ($main::reconfigure =~ /^(?:named|servers|all|forced)$/ || grep($_ eq "@masterDnsIps", ( '', 'no' ))
|| !$self->_checkIps( @masterDnsIps )
) {
@masterDnsIps = () if "@masterDnsIps" eq 'no';
Expand Down Expand Up @@ -211,7 +211,7 @@ sub askIPv6Support
my $ipv6 = main::setupGetQuestion( 'BIND_IPV6', $self->{'config'}->{'BIND_IPV6'} );
my $rs = 0;

if ($main::reconfigure =~ /^named|servers|all|forced$/ || $ipv6 !~ /^yes|no$/) {
if ($main::reconfigure =~ /^(?:named|servers|all|forced)$/ || $ipv6 !~ /^(?:yes|no)$/) {
($rs, $ipv6) = $dialog->radiolist( <<"EOF", [ 'yes', 'no' ], $ipv6 eq 'yes' ? 'yes' : 'no' );
Do you want enable IPv6 support for your DNS server?
Expand All @@ -238,7 +238,7 @@ sub askLocalDnsResolver
my $localDnsResolver = main::setupGetQuestion( 'LOCAL_DNS_RESOLVER', $self->{'config'}->{'LOCAL_DNS_RESOLVER'} );
my $rs = 0;

if ($main::reconfigure =~ /^resolver|named|all|forced$/ || $localDnsResolver !~ /^yes|no$/) {
if ($main::reconfigure =~ /^(?:resolver|named|all|forced)$/ || $localDnsResolver !~ /^(?:yes|no)$/) {
($rs, $localDnsResolver) = $dialog->radiolist( <<"EOF", [ 'yes', 'no' ], $localDnsResolver ne 'no' ? 'yes' : 'no' );
Do you want use the local DNS resolver?
Expand Down
4 changes: 2 additions & 2 deletions engine/PerlLib/Servers/po/courier/installer.pm
Expand Up @@ -101,7 +101,7 @@ sub authdaemonSqlUserDialog

my ($rs, $msg) = (0, '');

if ($main::reconfigure =~ /^po|servers|all|forced$/
if ($main::reconfigure =~ /^(?:po|servers|all|forced)$/
|| length $dbUser < 6 || length $dbUser > 16 || $dbUser !~ /^[\x21-\x5b\x5d-\x7e]+$/
|| length $dbPass < 6 || $dbPass !~ /^[\x21-\x5b\x5d-\x7e]+$/
) {
Expand Down Expand Up @@ -203,7 +203,7 @@ sub cyrusSaslSqlUserDialog

my ($rs, $msg) = (0, '');

if ($main::reconfigure =~ /^po|servers|all|forced$/
if ($main::reconfigure =~ /^(?:po|servers|all|forced)$/
|| length $dbUser < 6 || length $dbUser > 16 || $dbUser !~ /^[\x21-\x5b\x5d-\x7e]+$/
|| length $dbPass < 6 || $dbPass !~ /^[\x21-\x5b\x5d-\x7e]+$/
) {
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/Servers/po/dovecot/installer.pm
Expand Up @@ -100,7 +100,7 @@ sub showDialog

my ($rs, $msg) = (0, '');

if ($main::reconfigure =~ /^po|servers|all|forced$/
if ($main::reconfigure =~ /^(?:po|servers|all|forced)$/
|| length $dbUser < 6 || length $dbUser > 16 || $dbUser =~ /[^\x21-\x7e]+/
|| length $dbPass < 6 || $dbPass =~ /[^\x21-\x7e]+/
) {
Expand Down
2 changes: 1 addition & 1 deletion engine/PerlLib/iMSCP/LsbRelease.pm
Expand Up @@ -434,7 +434,7 @@ sub _guessDebianRelease

my ($kern) = uname();

if ($kern =~ /^Linux|Hurd|NetBSD$/) {
if ($kern =~ /^(?:Linux|Hurd|NetBSD)$/) {
$distInfo{'OS'} = "GNU/$kern";
} elsif ($kern eq 'FreeBSD') {
$distInfo{'OS'} = "GNU/k$kern";
Expand Down
4 changes: 2 additions & 2 deletions engine/PerlLib/iMSCP/Provider/Service/Debian/Sysvinit.pm
Expand Up @@ -73,11 +73,11 @@ sub isEnabled

# 104 is the exit status when you query start an enabled service.
# 106 is the exit status when the policy layer supplies a fallback action
if ($ret =~ /^104|106$/) {
if ($ret =~ /^(?:104|106)$/) {
return 1;
}

if ($ret =~ /^101|105$/) {
if ($ret =~ /^(?:101|105)$/) {
# 101 is action not allowed, which means we have to do the check manually.
# 105 is unknown, which generally means the iniscript does not support query
# The debian policy states that the initscript should support methods of query
Expand Down

0 comments on commit 56dd992

Please sign in to comment.