refactored the business logic into a class

This commit is contained in:
tracer 2022-03-24 15:44:08 +01:00
parent b1b4ee649e
commit 0725582282
1 changed files with 2 additions and 2 deletions

4
update.php Normal file → Executable file
View File

@ -6,7 +6,7 @@ define('PHPBB_ROOT_PATH', '../');
define('IN_PHPBB', true); define('IN_PHPBB', true);
define('SUPPORTED_RELEASE_MAJOR', 3); define('SUPPORTED_RELEASE_MAJOR', 3);
define('SUPPORTED_RELEASE_MINOR', 3); define('SUPPORTED_RELEASE_MINOR', 2);
function confirm($message = 'Are you sure? ', $options = array('y', 'n'), $default ='n') function confirm($message = 'Are you sure? ', $options = array('y', 'n'), $default ='n')
@ -139,7 +139,7 @@ if (!empty($argv[1])) {
// phpBB has major, minor and maintenance version scheme // phpBB has major, minor and maintenance version scheme
list($major, $minor, $patch) = explode('.', $installedVersion); list($major, $minor, $patch) = explode('.', $installedVersion);
if ((intval($major) != SUPPORTED_RELEASE_MAJOR)) { if ((intval($major) != SUPPORTED_RELEASE_MAJOR) || (intval($minor) != SUPPORTED_RELEASE_MINOR)) {
echo 'This script only supports phpBB ' . SUPPORTED_RELEASE_MAJOR . '.' . SUPPORTED_RELEASE_MINOR . ' branch.', PHP_EOL; echo 'This script only supports phpBB ' . SUPPORTED_RELEASE_MAJOR . '.' . SUPPORTED_RELEASE_MINOR . ' branch.', PHP_EOL;
exit(1); exit(1);
} }