if (isset($_SESSION['use_innodb']) && isset($build) && $build['0'] != 'DROP') { if ($_SESSION['use_innodb'] == TRUE) { $build = array_merge($build, array('MYSQL' => 'ENGINE=INNODB')); } else { $build = array_merge($build, array('MYSQL' => 'ENGINE=MYISAM')); } } // Install tables - $build is empty when we don't pick tables, when un / reinstalling packages if (!empty($gBitInstaller->mPackages[$package]['tables']) && is_array($gBitInstaller->mPackages[$package]['tables']) && !empty($build)) { foreach (array_keys($gBitInstaller->mPackages[$package]['tables']) as $tableName) { $completeTableName = $tablePrefix . $tableName; // in case prefix has backticks for schema $sql = $dict->CreateTableSQL($completeTableName, $gBitInstaller->mPackages[$package]['tables'][$tableName], $build); // Uncomment this line to see the create sql for ($sqlIdx = 0; $sqlIdx < count($sql); $sqlIdx++) { $gBitKernelDb->convertQuery($sql[$sqlIdx]); } if ($sql && $dict->ExecuteSQLArray($sql) <= 1) { $errors[] = 'Failed to create table ' . $completeTableName; $failedcommands[] = implode(" ", $sql); } } } $installedPackages[] = $package; } else { // push dependent package on the end of uninstalled array array_push($uninstalledPackages, $package); } $i++; } while (!empty($uninstalledPackages) && $i < $maxLoop); if ($i > $maxLoop) {
/** Converts backtick (`) quotes to the appropriate quote for the * database. * @private * @param pQuery the SQL query using backticks (`) * @return the correctly quoted SQL statement * @todo investigate replacement by AdoDB NameQuote() function */ function convertQuery(&$pQuery) { if (!empty($this->mType)) { switch ($this->mType) { case "oci8": // convert bind variables - adodb does not do that $qe = explode("?", $pQuery); $pQuery = ""; for ($i = 0; $i < sizeof($qe) - 1; $i++) { $pQuery .= $qe[$i] . ":" . $i; } $pQuery .= $qe[$i]; default: parent::convertQuery($pQuery); break; } } }