diff --git a/upgrades/7.1.0-7.1.2/scripts/BeforeUpgrade.php b/upgrades/7.1.0-7.1.2/scripts/BeforeUpgrade.php index 94dd272a07..2b4feba934 100644 --- a/upgrades/7.1.0-7.1.2/scripts/BeforeUpgrade.php +++ b/upgrades/7.1.0-7.1.2/scripts/BeforeUpgrade.php @@ -32,16 +32,10 @@ class BeforeUpgrade public function run(): void { if (php_sapi_name() === 'cli' && !in_array('-s', $_SERVER['argv'])) { - $contents = file_get_contents('application/Espo/Core/Console/Commands/Upgrade.php'); + echo "\n\nPlease re-run upgrade command with -s parameter:\n"; + echo " php command.php upgrade -s\n\n"; - $needle = "\$this->runSteps(\$upgradeId, \$stepList);\r\n }"; - - if (strpos($contents, $needle) !== false) { - echo "\n\nPlease re-run upgrade command with -s parameter:\n"; - echo " php command.php upgrade -s\n\n"; - - throw new \Espo\Core\Exceptions\Error("Need -s parameter."); - } + throw new \Espo\Core\Exceptions\Error("Need -s parameter."); } } } diff --git a/upgrades/7.1.1-7.1.2/scripts/BeforeUpgrade.php b/upgrades/7.1.1-7.1.2/scripts/BeforeUpgrade.php index 94dd272a07..2b4feba934 100644 --- a/upgrades/7.1.1-7.1.2/scripts/BeforeUpgrade.php +++ b/upgrades/7.1.1-7.1.2/scripts/BeforeUpgrade.php @@ -32,16 +32,10 @@ class BeforeUpgrade public function run(): void { if (php_sapi_name() === 'cli' && !in_array('-s', $_SERVER['argv'])) { - $contents = file_get_contents('application/Espo/Core/Console/Commands/Upgrade.php'); + echo "\n\nPlease re-run upgrade command with -s parameter:\n"; + echo " php command.php upgrade -s\n\n"; - $needle = "\$this->runSteps(\$upgradeId, \$stepList);\r\n }"; - - if (strpos($contents, $needle) !== false) { - echo "\n\nPlease re-run upgrade command with -s parameter:\n"; - echo " php command.php upgrade -s\n\n"; - - throw new \Espo\Core\Exceptions\Error("Need -s parameter."); - } + throw new \Espo\Core\Exceptions\Error("Need -s parameter."); } } }