mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
8dd644d25d
Namespace all templates Move difflib and BBCodeParser2 to thirdparty Remove deprecated API marked for removal in 4.0
36 lines
1.3 KiB
PHP
36 lines
1.3 KiB
PHP
<?php
|
|
|
|
// Register the SilverStripe provided databases
|
|
use SilverStripe\Dev\Install\DatabaseAdapterRegistry;
|
|
|
|
$frameworkPath = defined('FRAMEWORK_PATH') ? FRAMEWORK_PATH : FRAMEWORK_NAME;
|
|
|
|
// Use MySQLi as default
|
|
DatabaseAdapterRegistry::register(
|
|
array(
|
|
/** @skipUpgrade */
|
|
'class' => 'MySQLDatabase',
|
|
'title' => 'MySQL 5.0+ (using MySQLi)',
|
|
'helperPath' => $frameworkPath . '/dev/install/MySQLDatabaseConfigurationHelper.php',
|
|
'supported' => class_exists('MySQLi'),
|
|
'missingExtensionText' =>
|
|
'The <a href="http://www.php.net/manual/en/book.mysqli.php">MySQLi</a>
|
|
PHP extension is not available. Please install or enable it and refresh this page.'
|
|
)
|
|
);
|
|
|
|
// Setup MySQL PDO as alternate option
|
|
DatabaseAdapterRegistry::register(
|
|
array(
|
|
/** @skipUpgrade */
|
|
'class' => 'MySQLPDODatabase',
|
|
'title' => 'MySQL 5.0+ (using PDO)',
|
|
'helperPath' => $frameworkPath . '/dev/install/MySQLDatabaseConfigurationHelper.php',
|
|
'supported' => (class_exists('PDO') && in_array('mysql', PDO::getAvailableDrivers())),
|
|
'missingExtensionText' =>
|
|
'Either the <a href="http://www.php.net/manual/en/book.pdo.php">PDO Extension</a> or
|
|
the <a href="http://www.php.net/manual/en/ref.pdo-mysql.php">MySQL PDO Driver</a>
|
|
are unavailable. Please install or enable these and refresh this page.'
|
|
)
|
|
);
|