Commit 94b4bcf7 authored by alexpott's avatar alexpott

Issue #3048885 by RenatoG: Examples using new array in settings.php

parent f7aeba59
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
* specific needs. * specific needs.
* *
* @code * @code
* $databases['default']['default'] = array ( * $databases['default']['default'] = [
* 'database' => 'databasename', * 'database' => 'databasename',
* 'username' => 'sqlusername', * 'username' => 'sqlusername',
* 'password' => 'sqlpassword', * 'password' => 'sqlpassword',
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
* 'driver' => 'mysql', * 'driver' => 'mysql',
* 'prefix' => '', * 'prefix' => '',
* 'collation' => 'utf8mb4_general_ci', * 'collation' => 'utf8mb4_general_ci',
* ); * ];
* @endcode * @endcode
*/ */
$databases = []; $databases = [];
...@@ -156,13 +156,13 @@ ...@@ -156,13 +156,13 @@
* The 'default' element is mandatory and holds the prefix for any tables * The 'default' element is mandatory and holds the prefix for any tables
* not specified elsewhere in the array. Example: * not specified elsewhere in the array. Example:
* @code * @code
* 'prefix' => array( * 'prefix' => [
* 'default' => 'main_', * 'default' => 'main_',
* 'users' => 'shared_', * 'users' => 'shared_',
* 'sessions' => 'shared_', * 'sessions' => 'shared_',
* 'role' => 'shared_', * 'role' => 'shared_',
* 'authmap' => 'shared_', * 'authmap' => 'shared_',
* ), * ],
* @endcode * @endcode
* You can also use a reference to a schema/database as a prefix. This may be * You can also use a reference to a schema/database as a prefix. This may be
* useful if your Drupal installation exists in a schema that is not the default * useful if your Drupal installation exists in a schema that is not the default
...@@ -170,13 +170,13 @@ ...@@ -170,13 +170,13 @@
* time. * time.
* Example: * Example:
* @code * @code
* 'prefix' => array( * 'prefix' => [
* 'default' => 'main.', * 'default' => 'main.',
* 'users' => 'shared.', * 'users' => 'shared.',
* 'sessions' => 'shared.', * 'sessions' => 'shared.',
* 'role' => 'shared.', * 'role' => 'shared.',
* 'authmap' => 'shared.', * 'authmap' => 'shared.',
* ); * ];
* @endcode * @endcode
* NOTE: MySQL and SQLite's definition of a schema is a database. * NOTE: MySQL and SQLite's definition of a schema is a database.
* *
...@@ -185,14 +185,14 @@ ...@@ -185,14 +185,14 @@
* example, to enable MySQL SELECT queries to exceed the max_join_size system * example, to enable MySQL SELECT queries to exceed the max_join_size system
* variable, and to reduce the database connection timeout to 5 seconds: * variable, and to reduce the database connection timeout to 5 seconds:
* @code * @code
* $databases['default']['default'] = array( * $databases['default']['default'] = [
* 'init_commands' => array( * 'init_commands' => [
* 'big_selects' => 'SET SQL_BIG_SELECTS=1', * 'big_selects' => 'SET SQL_BIG_SELECTS=1',
* ), * ],
* 'pdo' => array( * 'pdo' => [
* PDO::ATTR_TIMEOUT => 5, * PDO::ATTR_TIMEOUT => 5,
* ), * ],
* ); * ];
* @endcode * @endcode
* *
* WARNING: The above defaults are designed for database portability. Changing * WARNING: The above defaults are designed for database portability. Changing
...@@ -207,22 +207,22 @@ ...@@ -207,22 +207,22 @@
* *
* Sample Database configuration format for PostgreSQL (pgsql): * Sample Database configuration format for PostgreSQL (pgsql):
* @code * @code
* $databases['default']['default'] = array( * $databases['default']['default'] = [
* 'driver' => 'pgsql', * 'driver' => 'pgsql',
* 'database' => 'databasename', * 'database' => 'databasename',
* 'username' => 'sqlusername', * 'username' => 'sqlusername',
* 'password' => 'sqlpassword', * 'password' => 'sqlpassword',
* 'host' => 'localhost', * 'host' => 'localhost',
* 'prefix' => '', * 'prefix' => '',
* ); * ];
* @endcode * @endcode
* *
* Sample Database configuration format for SQLite (sqlite): * Sample Database configuration format for SQLite (sqlite):
* @code * @code
* $databases['default']['default'] = array( * $databases['default']['default'] = [
* 'driver' => 'sqlite', * 'driver' => 'sqlite',
* 'database' => '/path/to/databasefilename', * 'database' => '/path/to/databasefilename',
* ); * ];
* @endcode * @endcode
*/ */
...@@ -246,9 +246,9 @@ ...@@ -246,9 +246,9 @@
* *
* Example: * Example:
* @code * @code
* $config_directories = array( * $config_directories = [
* CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot', * CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot',
* ); * ];
* @endcode * @endcode
*/ */
$config_directories = []; $config_directories = [];
...@@ -705,9 +705,9 @@ ...@@ -705,9 +705,9 @@
* *
* For example: * For example:
* @code * @code
* $settings['trusted_host_patterns'] = array( * $settings['trusted_host_patterns'] = [
* '^www\.example\.com$', * '^www\.example\.com$',
* ); * ];
* @endcode * @endcode
* will allow the site to only run from www.example.com. * will allow the site to only run from www.example.com.
* *
...@@ -718,12 +718,12 @@ ...@@ -718,12 +718,12 @@
* *
* For example: * For example:
* @code * @code
* $settings['trusted_host_patterns'] = array( * $settings['trusted_host_patterns'] = [
* '^example\.com$', * '^example\.com$',
* '^.+\.example\.com$', * '^.+\.example\.com$',
* '^example\.org$', * '^example\.org$',
* '^.+\.example\.org$', * '^.+\.example\.org$',
* ); * ];
* @endcode * @endcode
* will allow the site to run off of all variants of example.com and * will allow the site to run off of all variants of example.com and
* example.org, with all subdomains included. * example.org, with all subdomains included.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment