Skip to content
Snippets Groups Projects
Commit 334461e1 authored by Jared Hancock's avatar Jared Hancock
Browse files

setup: Make mysqli extension requirement clearer

parent d665d394
No related branches found
No related tags found
No related merge requests found
......@@ -93,6 +93,10 @@ Class SetupWizard {
return (extension_loaded('mysqli'));
}
function check_mysql_version() {
return (version_compare(db_version(), $this->getMySQLVersion())>=0);
}
function check_prereq() {
return ($this->check_php() && $this->check_mysql());
}
......
......@@ -103,20 +103,16 @@ class Upgrader {
return $this->getCurrentStream()->upgrade();
}
function check_prereq() {
if ($this->getCurrentStream())
return $this->getCurrentStream()->check_prereq();
}
function check_php() {
if ($this->getCurrentStream())
return $this->getCurrentStream()->check_php();
}
function check_mysql() {
if ($this->getCurrentStream())
return $this->getCurrentStream()->check_mysql();
function __call($what, $args) {
if ($this->getCurrentStream()) {
$callable = array($this->getCurrentStream(), $what);
if (!is_callable($callable))
throw new Exception('InternalError: Upgrader method not callable: '
. $what);
return call_user_func_array($callable, $args);
}
}
function getTask() {
if($this->getCurrentStream())
return $this->getCurrentStream()->getTask();
......@@ -213,6 +209,9 @@ class StreamUpgrader extends SetupWizard {
$this->migrater = null;
}
function check_prereq() {
return (parent::check_prereq() && $this->check_mysql_version());
}
function onError($error) {
global $ost, $thisstaff;
......
......@@ -17,7 +17,9 @@ if(!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access D
<li class="<?php echo $upgrader->check_php()?'yes':'no'; ?>">
PHP v5.3 or greater - (<small><b><?php echo PHP_VERSION; ?></b></small>)</li>
<li class="<?php echo $upgrader->check_mysql()?'yes':'no'; ?>">
MySQL v5.0 or greater - (<small><b><?php echo extension_loaded('mysql')?'module loaded':'missing!'; ?></b></small>)</li>
MySQLi extension for PHP - (<small><b><?php echo extension_loaded('mysqli')?'module loaded':'missing!'; ?></b></small>)</li>
<li class="<?php echo $upgrader->check_mysql_version()?'yes':'no'; ?>">
MySQL v5.0 or greater - (<small><b><?php echo db_version(); ?></b></small>)</li>
</ul>
<h3>Highly Recommended:</h3>
We highly recommend that you follow the steps below.
......
......@@ -17,7 +17,7 @@ if(!defined('SETUPINC')) die('Kwaheri!');
<li class="<?php echo $installer->check_php()?'yes':'no'; ?>">
PHP v5.3 or greater - (<small><b><?php echo PHP_VERSION; ?></b></small>)</li>
<li class="<?php echo $installer->check_mysql()?'yes':'no'; ?>">
MySQL v5.0 or greater - (<small><b><?php echo extension_loaded('mysql')?'module loaded':'missing!'; ?></b></small>)</li>
MySQLi extension for PHP - (<small><b><?php echo extension_loaded('mysqli')?'module loaded':'missing!'; ?></b></small>)</li>
</ul>
<h3>Recommended:</h3>
You can use osTicket without these, but you may not be able to use all features.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment