From 42d768826b090a06b3d6fda4de76f46496b40bab Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 15 May 2021 22:13:53 -0700 Subject: [PATCH] Remove obsolete function --- scripts-lib.pl | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/scripts-lib.pl b/scripts-lib.pl index 471b5ea1f..aab547328 100755 --- a/scripts-lib.pl +++ b/scripts-lib.pl @@ -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 $chk->{'forbidden_mode'} 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