function createUpdater($settings) { if (!isset($settings) or !isset($settings["db"]) or !isset($settings["db"]["type"]) or !isValidConfigurationType($settings["db"]["type"])) { die; } require_once "update/UpdateController.class.php"; switch (strtolower($settings["db"]["type"])) { case 'pdo': require_once "update/pdo/PDOUpdater.class.php"; return new UpdateController(new PDOUpdater($settings)); case 'mysql': require_once "update/mysql/MySQLUpdater.class.php"; return new UpdateController(new MySQLUpdater($settings)); case 'sqlite': case 'sqlite3': require_once "update/sqlite/SQLiteUpdater.class.php"; return new UpdateController(new SQLiteUpdater($settings)); default: die("Unsupported updater type: " . $type); } }
* Released under GPL License. * * License: http://www.mollify.org/license.php */ $MAIN_PAGE = "install"; $installer = NULL; set_include_path(realpath('../') . PATH_SEPARATOR . get_include_path()); require_once "MollifyInstallProcessor.class.php"; require_once "install/DefaultInstaller.class.php"; chdir(".."); if (!file_exists("configuration.php")) { $installer = new DefaultInstaller("instructions_configuration_create"); } else { @(include "configuration.php"); global $CONFIGURATION; if (!isset($CONFIGURATION) or !isset($CONFIGURATION["db"]) or !isset($CONFIGURATION["db"]["type"]) or !isValidConfigurationType($CONFIGURATION["db"]["type"])) { $installer = new DefaultInstaller("instructions_configuration_type"); } } if (!$installer) { $installer = createInstaller($CONFIGURATION, $CONFIGURATION["db"]["type"]); } try { $installer->process(); } catch (Exception $e) { $installer->onError($e); } function createInstaller($settings, $type) { switch (strtolower($type)) { case 'pdo':