diff --git a/etc/phpmyadmin/config.inc.php b/etc/phpmyadmin/config.inc.php index 9ab1c973..f912b84b 100644 --- a/etc/phpmyadmin/config.inc.php +++ b/etc/phpmyadmin/config.inc.php @@ -13,7 +13,13 @@ 'PMA_PORTS', 'PMA_USER', 'PMA_PASSWORD', - 'PMA_ABSOLUTE_URI' + 'PMA_ABSOLUTE_URI', + 'PMA_CONTROLHOST', + 'PMA_CONTROLPORT', + 'PMA_PMADB', + 'PMA_CONTROLUSER', + 'PMA_CONTROLPASS', + 'PMA_QUERYHISTORYDB' ); foreach ($vars as $var) { $env = getenv($var); @@ -21,6 +27,9 @@ $_ENV[$var] = $env; } } +if (isset($_ENV['PMA_QUERYHISTORYDB'])) { + $cfg['QueryHistoryDB'] = boolval($_ENV['PMA_QUERYHISTORYDB']); +} /* Arbitrary server connection */ if (isset($_ENV['PMA_ARBITRARY']) && $_ENV['PMA_ARBITRARY'] === '1') { @@ -64,8 +73,42 @@ } else { $cfg['Servers'][$i]['auth_type'] = 'cookie'; } - $cfg['Servers'][$i]['compress'] = false; - $cfg['Servers'][$i]['AllowNoPassword'] = true; + if (isset($_ENV['PMA_PMADB'])) { + $cfg['Servers'][$i]['pmadb'] = $_ENV['PMA_PMADB']; + $cfg['Servers'][$i]['relation'] = 'pma__relation'; + $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; + $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; + $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; + $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; + $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; + $cfg['Servers'][$i]['history'] = 'pma__history'; + $cfg['Servers'][$i]['recent'] = 'pma__recent'; + $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; + $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; + $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; + $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; + $cfg['Servers'][$i]['users'] = 'pma__users'; + $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; + $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; + $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; + $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; + $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; + $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + $cfg['Servers'][$i]['compress'] = false; + $cfg['Servers'][$i]['AllowNoPassword'] = true; + } + if (isset($_ENV['PMA_CONTROLHOST'])) { + $cfg['Servers'][$i]['controlhost'] = $_ENV['PMA_CONTROLHOST']; + } + if (isset($_ENV['PMA_CONTROLPORT'])) { + $cfg['Servers'][$i]['controlport'] = $_ENV['PMA_CONTROLPORT']; + } + if (isset($_ENV['PMA_CONTROLUSER'])) { + $cfg['Servers'][$i]['controluser'] = $_ENV['PMA_CONTROLUSER']; + } + if (isset($_ENV['PMA_CONTROLPASS'])) { + $cfg['Servers'][$i]['controlpass'] = $_ENV['PMA_CONTROLPASS']; + } } /* * Revert back to last configured server to make