コード例 #1
0
ファイル: index.php プロジェクト: nicholasryan/CorePlus
//require_once(ROOT_PDIR . 'core/libs/core/Exception.php');
require_once(ROOT_PDIR . 'install/classes/InstallerStep.php');
require_once(ROOT_PDIR . 'core/functions/Core.functions.php');
require_once(ROOT_PDIR . 'install/utilities.php');

require_once(ROOT_PDIR . "core/libs/core/ConfigHandler.class.php");

// If the configuration file has been written already, load up those config options!
if(file_exists(ROOT_PDIR . 'config/configuration.xml')){
	require_once(ROOT_PDIR . 'core/libs/core/datamodel/DMI.class.php');
	require_once(ROOT_PDIR . "core/libs/core/HookHandler.class.php");
	try {
		HookHandler::singleton();
		// Register some low-level hooks so it doesn't complain.
		HookHandler::RegisterNewHook('/core/model/presave');
		HookHandler::RegisterNewHook('/core/model/postsave');
		$core_settings = ConfigHandler::LoadConfigFile('configuration');

		// It was able to pull a valid configuration file... see if I can connect to the database
		$dbconn = DMI::GetSystemDMI();

		// And the backend connection...
		$backend = $dbconn->connection();

		// If I can poll the components table.... just stop right the f**k here!
		// This is a pretty good indication that the system is installed.
		if($backend->tableExists('component')){
			die('Core Plus has been successfully installed!  <a href="../">Continue</a>');
		}
	}
	catch (Exception $e) {