MINOR Fallbacks for _register_database path when FRAMEWORK_PATH isn't

available yet (during installation)
This commit is contained in:
Sean Harvey 2012-04-14 13:26:59 +12:00
parent c45027d247
commit f238fa4492
1 changed files with 3 additions and 1 deletions

View File

@ -1,11 +1,13 @@
<?php
// Register the SilverStripe provided databases
$frameworkPath = defined('FRAMEWORK_PATH') ? FRAMEWORK_PATH : FRAMEWORK_NAME;
DatabaseAdapterRegistry::register(
array(
'class' => 'MySQLDatabase',
'title' => 'MySQL 5.0+',
'helperPath' => FRAMEWORK_PATH . '/dev/install/MySQLDatabaseConfigurationHelper.php',
'helperPath' => $frameworkPath . '/dev/install/MySQLDatabaseConfigurationHelper.php',
'supported' => function_exists('mysql_connect'),
)
);