Skip to content

Commit 01f5f13

Browse files
committed
update installer to know about MySQLi
1 parent e0b0ef2 commit 01f5f13

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

packages/core/lib/archoninstaller.inc.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static function upgradeDB($PackagePath, $arrUpgradeDirs, $strPackageName
121121

122122
ArchonInstaller::updateDBProgressTable('', "Upgrading $strPackageName to version $UpgradeDir...");
123123

124-
if($_ARCHON->db->ServerType == 'MySQL' && file_exists("structure-mysql.sql"))
124+
if(($_ARCHON->db->ServerType == 'MySQL' || $_ARCHON->db->ServerType == 'MySQLi') && file_exists("structure-mysql.sql"))
125125
{
126126
ArchonInstaller::execSQLFile("structure-mysql.sql");
127127
}
@@ -130,7 +130,7 @@ public static function upgradeDB($PackagePath, $arrUpgradeDirs, $strPackageName
130130
ArchonInstaller::execSQLFile("structure-mssql.sql");
131131
}
132132

133-
if($_ARCHON->db->ServerType == 'MySQL' && file_exists("insert-mysql.sql"))
133+
if(($_ARCHON->db->ServerType == 'MySQL' || $_ARCHON->db->ServerType == 'MySQLi') && file_exists("insert-mysql.sql"))
134134
{
135135
ArchonInstaller::execSQLFile("insert-mysql.sql");
136136
}
@@ -144,7 +144,7 @@ public static function upgradeDB($PackagePath, $arrUpgradeDirs, $strPackageName
144144
ArchonInstaller::execSQLFile("insert.sql");
145145
}
146146

147-
if($_ARCHON->db->ServerType == 'MySQL' && file_exists("update-mysql.sql"))
147+
if(($_ARCHON->db->ServerType == 'MySQL' || $_ARCHON->db->ServerType == 'MySQLi') && file_exists("update-mysql.sql"))
148148
{
149149
ArchonInstaller::execSQLFile("update-mysql.sql");
150150
}
@@ -163,7 +163,7 @@ public static function upgradeDB($PackagePath, $arrUpgradeDirs, $strPackageName
163163
require_once("update.php");
164164
}
165165

166-
if($_ARCHON->db->ServerType == 'MySQL' && file_exists("drop-mysql.sql"))
166+
if(($_ARCHON->db->ServerType == 'MySQL' || $_ARCHON->db->ServerType == 'MySQLi') && file_exists("drop-mysql.sql"))
167167
{
168168
ArchonInstaller::execSQLFile("drop-mysql.sql");
169169
}
@@ -262,7 +262,7 @@ public static function installDB($PackagePath)
262262
$cwd = getcwd();
263263
chdir($PackagePath);
264264

265-
if($_ARCHON->db->ServerType == 'MySQL')
265+
if(($_ARCHON->db->ServerType == 'MySQL' || $_ARCHON->db->ServerType == 'MySQLi'))
266266
{
267267
ArchonInstaller::execSQLFile("install-mysql.sql");
268268
}
@@ -294,7 +294,7 @@ public static function uninstallDB($PackagePath)
294294
$cwd = getcwd();
295295
chdir($PackagePath);
296296

297-
if($_ARCHON->db->ServerType == 'MySQL')
297+
if(($_ARCHON->db->ServerType == 'MySQL' || $_ARCHON->db->ServerType == 'MySQLi'))
298298
{
299299
ArchonInstaller::execSQLFile("uninstall-mysql.sql");
300300
}
@@ -328,7 +328,7 @@ public static function checkForMDB2()
328328
ob_end_clean();
329329
die("MDB2 MSSQL Driver is not correctly installed. <br /><br /> <a href='http://archon.org/mdb2.html'>Click here</a> for more information on how to make sure MDB2 is installed and correctly configured.");
330330
}
331-
elseif($_ARCHON->db->ServerType == 'MySQL' && !readfile('MDB2/Driver/mysql.php',true))
331+
elseif(($_ARCHON->db->ServerType == 'MySQL' || $_ARCHON->db->ServerType == 'MySQLi') && !(readfile('MDB2/Driver/mysql.php',true) || readfile('MDB2/Driver/mysqli.php', true)))
332332
{
333333
ob_end_clean();
334334
die("MDB2 MySQL Driver is not correctly installed. <br /><br /> <a href='http://archon.org/mdb2.html'>Click here</a> for more information on how to make sure MDB2 is installed and correctly configured.");
@@ -386,7 +386,7 @@ public static function dropDBProgressTable()
386386
{
387387
$query = "IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'db_progress') DROP TABLE db_progress";
388388
}
389-
elseif($_ARCHON->db->ServerType == 'MySQL')
389+
elseif($_ARCHON->db->ServerType == 'MySQL' || $_ARCHON->db->ServerType == 'MySQLi')
390390
{
391391
$query = "DROP TABLE IF EXISTS db_progress";
392392
}

0 commit comments

Comments
 (0)