Skip to content

Commit

Permalink
Remove obsolete function
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed May 16, 2021
1 parent f3e0bfe commit 42d7688
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions scripts-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2319,32 +2319,6 @@ sub create_script_php_cron
}
}

# check_script_php_depends(&domain, &check)
# Check if PHP version/mode needed for the script installer fits requirements
sub check_script_php_depends
{
my ($d, $chk) = @_;
my $mode = &get_domain_php_mode($d);
my $phpv = &get_domain_php_version($d);
if (defined($chk->{'forbidden_mode'}) && $mode eq $chk->{'forbidden_mode'}) {
return "$chk->{'name'} PHP scripts cannot be executed in <tt>$chk->{'forbidden_mode'}</tt> mode";
}
elsif (!$phpv) {
return "Cannot work out virtual server exact PHP version";
}
elsif (defined($chk->{'min'}) &&
&compare_versions($phpv, $chk->{'min'}) == -1) {
my ($ver) = $chk->{'min'} =~ /^(\d+.\d+|\d+)/;
return "$chk->{'name'} requires PHP version $ver or later";
}
elsif (defined($chk->{'max'}) &&
&compare_versions($phpv, $chk->{'max'}) == 1) {
my ($ver) = $chk->{'max'} =~ /^(\d+.\d+|\d+)/;
return "$chk->{'name'} requires PHP version $ver or older";
}
return undef;
}

# delete_script_php_cron(&domain, cmd)
# Remove the cron job that runs some PHP command
sub delete_script_php_cron
Expand Down

0 comments on commit 42d7688

Please sign in to comment.