From a9f87975ced4d2443ea2394bb3480178fb7ef6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 17 Oct 2005 11:46:08 +0000 Subject: [PATCH] Group databases by rightmost separator (bug #1325651). --- ChangeLog | 2 ++ libraries/common.lib.php | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0804eacab..1e90eeb5e 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ $Source$ 2005-10-17 Michal Čihař * lang/czech: Translation fixes. + * libraries/common.lib.php: Group databases by rightmost separator (bug + #1325651). 2005-10-17 Sebastian Mendel * css/phpmyadmin.css.php: border around tabs bug #1326730 diff --git a/libraries/common.lib.php b/libraries/common.lib.php index ef6112341..d5e700aef 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -829,11 +829,9 @@ function PMA_getDbList() { && $GLOBALS['cfg']['LeftFrameDBSeparator'] && strstr( $db, $GLOBALS['cfg']['LeftFrameDBSeparator'] ) ) { - $parts = explode( $GLOBALS['cfg']['LeftFrameDBSeparator'], - $db, 2 ); - $group = $parts[0]; - $disp_name_cut = $GLOBALS['cfg']['LeftFrameDBSeparator'] - . $parts[1]; + $pos = strrpos($db, $GLOBALS['cfg']['LeftFrameDBSeparator']); + $group = substr($db, 0, $pos); + $disp_name_cut = substr($db, $pos); } else { $group = $db; $disp_name_cut = $db;