Skip to content

Commit

Permalink
Use new array syntax on code examples in docs
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Apr 28, 2021
1 parent d005ea8 commit 1c3a41f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions doc/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ Server connection settings

.. code-block:: php
$cfg['Servers'][$i]['only_db'] = array('db1', 'db2');
$cfg['Servers'][$i]['only_db'] = ['db1', 'db2'];
.. versionchanged:: 4.0.0
Previous versions permitted to specify the display order of
Expand Down Expand Up @@ -1383,19 +1383,19 @@ Server connection settings
.. code-block:: none
$cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow bob from all');
$cfg['Servers'][$i]['AllowDeny']['rules'] = ['allow bob from all'];
// Allow only 'bob' to connect from any host
$cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow mary from 192.168.100.[50-100]');
$cfg['Servers'][$i]['AllowDeny']['rules'] = ['allow mary from 192.168.100.[50-100]'];
// Allow only 'mary' to connect from host 192.168.100.50 through 192.168.100.100
$cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow % from 192.168.[5-6].10');
$cfg['Servers'][$i]['AllowDeny']['rules'] = ['allow % from 192.168.[5-6].10'];
// Allow any user to connect from host 192.168.5.10 or 192.168.6.10
$cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow root from 192.168.5.50','allow % from 192.168.6.10');
$cfg['Servers'][$i]['AllowDeny']['rules'] = ['allow root from 192.168.5.50','allow % from 192.168.6.10'];
// Allow any user to connect from 192.168.6.10, and additionally allow root to connect from 192.168.5.50
.. config:option:: $cfg['Servers'][$i]['DisableIS']
Expand Down Expand Up @@ -2815,7 +2815,7 @@ Web server settings

.. code-block:: php
$cfg['TrustedProxies'] = array('1.2.3.4' => 'HTTP_X_FORWARDED_FOR');
$cfg['TrustedProxies'] = ['1.2.3.4' => 'HTTP_X_FORWARDED_FOR'];
The :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` directive uses the
client's IP address as usual.
Expand Down Expand Up @@ -3549,7 +3549,7 @@ Developer
.. config:option:: $cfg['DBG']
:type: array
:default: array(...)
:default: []

.. config:option:: $cfg['DBG']['sql']
Expand Down
4 changes: 2 additions & 2 deletions doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1175,13 +1175,13 @@ network :term:`IP` blocks.
//block root from logging in except from the private networks
$cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array(
$cfg['Servers'][$i]['AllowDeny']['rules'] = [
'deny root from all',
'allow root from localhost',
'allow root from 10.0.0.0/8',
'allow root from 192.168.0.0/16',
'allow root from 172.16.0.0/12',
);
];
.. _faq4_7:

Expand Down

0 comments on commit 1c3a41f

Please sign in to comment.