From fc12c997ef0ffeb4030d83fbe63233f143e477b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 22 Sep 2016 09:55:02 +0200 Subject: [PATCH] Allow to specify verbose names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #54 Signed-off-by: Michal Čihař --- README.md | 2 ++ config.inc.php | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index d6a1ed38..a180b464 100644 --- a/README.md +++ b/README.md @@ -85,8 +85,10 @@ Set the variable ``PMA_ABSOLUTE_URI`` to the fully-qualified path (``https://pma * ``PMA_ARBITRARY`` - when set to 1 connection to the arbitrary server will be allowed * ``PMA_HOST`` - define address/host name of the MySQL server +* ``PMA_VERBOSE`` - define verbose name of the MySQL server * ``PMA_PORT`` - define port of the MySQL server * ``PMA_HOSTS`` - define comma separated list of address/host names of the MySQL servers +* ``PMA_VERBOSES`` - define comma separated list of verbose names of the MySQL servers * ``PMA_USER`` and ``PMA_PASSWORD`` - define username to use for config authentication method * ``PMA_ABSOLUTE_URI`` - define user-facing URI diff --git a/config.inc.php b/config.inc.php index a35c2f7a..47f1786a 100644 --- a/config.inc.php +++ b/config.inc.php @@ -36,13 +36,18 @@ /* Set by environment */ if (!empty($_ENV['PMA_HOST'])) { $hosts = array($_ENV['PMA_HOST']); + $verbose = array($_ENV['PMA_VERBOSE']); } elseif (!empty($_ENV['PMA_HOSTS'])) { $hosts = explode(',', $_ENV['PMA_HOSTS']); + $verbose = explode(',', $_ENV['PMA_VERBOSES']); } /* Server settings */ for ($i = 1; isset($hosts[$i - 1]); $i++) { $cfg['Servers'][$i]['host'] = $hosts[$i - 1]; + if (isset($verbose[$i - 1])) { + $cfg['Servers'][$i]['verbose'] = $verbose[$i - 1]; + } if (isset($_ENV['PMA_PORT'])) { $cfg['Servers'][$i]['port'] = $_ENV['PMA_PORT']; }