From c4da8edf90896bca63b605f25d17d3e44363edf9 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Sat, 7 Oct 2017 18:28:02 +0200 Subject: [PATCH] [fix] enhance the display of phpmyadmin SSO access : goes directly to the right database --- bureau/admin/sql_getparam.php | 5 +---- bureau/admin/sql_pma_sso.php | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/bureau/admin/sql_getparam.php b/bureau/admin/sql_getparam.php index 39347ce8..721cf661 100644 --- a/bureau/admin/sql_getparam.php +++ b/bureau/admin/sql_getparam.php @@ -97,10 +97,7 @@ if ($r[Rights] == 'All') { - -

- http:///alternc-sql/ -

+ array ("request", "string", ""), +); +getFields($fields); + + if ($r=$mysql->php_myadmin_connect()) { // SSO of PhpMyAdmin $_SESSION['PMA_single_signon_user'] = $r["login"]; @@ -39,8 +45,16 @@ if ($r=$mysql->php_myadmin_connect()) { // Forget any standard phpmyadmin session setcookie("phpMyAdmin", "", time() - 3600); + if ($id!="") { + $r=$mysql->get_mysql_details($id); + if ($r) { + $db="?db=".$id; + } + } else { + $db=""; + } // finally redirect to phpMyAdmin : - header("Location: /alternc-sql/index.php"); + header("Location: /alternc-sql/index.php".$db); exit(); }