From 506213899be121dda3c2c40766ee4a6ff5e7149c Mon Sep 17 00:00:00 2001 From: David Alexander Date: Wed, 2 Nov 2016 18:07:18 +1300 Subject: [PATCH] Setting default db adapter in installation as PDO MySQL with MySQLi as fail safe. Added back missed assignment of $_REQUEST['db']['type'] --- _register_database.php | 35 ++++++++++++++++---------------- src/Dev/Install/config-form.html | 11 +++++++--- src/Dev/Install/install.php5 | 22 +++++++++++++++++--- 3 files changed, 45 insertions(+), 23 deletions(-) diff --git a/_register_database.php b/_register_database.php index 903e3a0e5..c7549a887 100644 --- a/_register_database.php +++ b/_register_database.php @@ -1,26 +1,11 @@ 'MySQLDatabase', - 'module' => 'framework', - 'title' => 'MySQL 5.0+ (using MySQLi)', - 'helperPath' => __DIR__ . '/src/Dev/Install/MySQLDatabaseConfigurationHelper.php', - 'helperClass' => MySQLDatabaseConfigurationHelper::class, - 'supported' => class_exists('MySQLi'), - 'missingExtensionText' => - 'The MySQLi - PHP extension is not available. Please install or enable it and refresh this page.' - ) -); -// Setup MySQL PDO as alternate option +// Register MySQL PDO as a database adapter (listed as first option in Dev/Install/config-form.html) DatabaseAdapterRegistry::register( array( /** @skipUpgrade */ @@ -36,3 +21,19 @@ DatabaseAdapterRegistry::register( are unavailable. Please install or enable these and refresh this page.' ) ); + +// Register MySQLi as a database adapter (listed as second option in Dev/Install/config-form.html) +DatabaseAdapterRegistry::register( + array( + /** @skipUpgrade */ + 'class' => 'MySQLDatabase', + 'module' => 'framework', + 'title' => 'MySQL 5.0+ (using MySQLi)', + 'helperPath' => __DIR__ . '/src/Dev/Install/MySQLDatabaseConfigurationHelper.php', + 'helperClass' => MySQLDatabaseConfigurationHelper::class, + 'supported' => class_exists('MySQLi'), + 'missingExtensionText' => + 'The MySQLi + PHP extension is not available. Please install or enable it and refresh this page.' + ) +); diff --git a/src/Dev/Install/config-form.html b/src/Dev/Install/config-form.html index 42ead62dd..dbf514c25 100644 --- a/src/Dev/Install/config-form.html +++ b/src/Dev/Install/config-form.html @@ -183,14 +183,15 @@ -
- -
+
+ +
+

CMS Admin Account Step 3 of 5

@@ -240,6 +241,10 @@
+
+ +
+

Theme selection Step 4 of 5

You can change the theme or download another from the SilverStripe website after installation.