Skip to content
Browse files

Cleaning up min-php version checking and changing install view output…

… if tests did not pass;
  • Loading branch information...
1 parent 42a072b commit ae5f09a45a13842902fe2bf98715814142145fac @Gipetto Gipetto committed Aug 24, 2011
Showing with 8 additions and 2 deletions.
  1. +4 −2 OpenVBX/controllers/install.php
  2. +4 −0 OpenVBX/views/install/main.php
View
6 OpenVBX/controllers/install.php
@@ -27,6 +27,8 @@ class Install extends Controller {
public $tests;
public $pass;
+
+ protected $min_php_version = '5.0.0';
function Install()
{
@@ -94,10 +96,10 @@ private function run_tests()
$this->tests = array();
$this->pass = TRUE;
- $this->add_test(version_compare(PHP_VERSION, '5.0.0', '>='),
+ $this->add_test(version_compare(PHP_VERSION, $this->min_php_version, '>='),
'PHP version',
PHP_VERSION,
- 'You must be running at least PHP 5.0; you are using ' . PHP_VERSION);
+ 'You must be running at least PHP '.$this->min_php_version.'; you are using ' . PHP_VERSION);
$this->add_test(function_exists('mysql_connect'),
'MySQL',
View
4 OpenVBX/views/install/main.php
@@ -41,7 +41,11 @@
</ul>
<div class="information">
+ <?php if ($pass): ?>
<p><strong>Heads up&hellip;</strong> have your database credentials and <br />Twilio Account information handy.</p>
+ <?php else: ?>
+ <p><strong>Tests did not pass. Please correct the problems listed above before continuing.</strong></p>
+ <?php endif; ?>
</div>
</div>

0 comments on commit ae5f09a

Please sign in to comment.
Something went wrong with that request. Please try again.