Merge branch 'master' of github.com:sourcefabric/Airtime

This commit is contained in:
Naomi 2013-11-11 17:18:38 -05:00
commit ed304ed309
3 changed files with 22 additions and 0 deletions

View File

@ -529,4 +529,14 @@ class AirtimeInstall
}
return $opts;
}
public static function checkPHPVersion()
{
if (PHP_VERSION_ID < 50400)
{
echo "Error: Airtime requires PHP 5.4 or greater.";
return false;
}
return true;
}
}

View File

@ -12,6 +12,12 @@ require_once(__DIR__.'/airtime-constants.php');
// The only way we get here is if we are doing a new install or a reinstall.
// -------------------------------------------------------------------------
//Enforce a minimum PHP version
if (!AirtimeInstall::checkPHPVersion())
{
exit(1);
}
$iniExists = file_exists("/etc/airtime/airtime.conf");
if ($iniExists) {
//reinstall, Will ask if we should rewrite config files.

View File

@ -34,6 +34,12 @@ $con = Propel::getConnection();
$version = AirtimeInstall::GetVersionInstalled();
//Enforce a minimum PHP version
if (!AirtimeInstall::checkPHPVersion())
{
exit(1);
}
echo "******************************** Upgrade Begin *********************************".PHP_EOL;
$CC_CONFIG = Config::getConfig();