refactored the business logic into a class
This commit is contained in:
parent
b1b4ee649e
commit
0725582282
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue