From 840a5b3d5677bb3d144475a07e52c35fa3aebc8a Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 31 May 2006 16:43:45 +0000 Subject: [PATCH] bug #1498108, support twice the separator in db name --- ChangeLog | 4 ++++ libraries/common.lib.php | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 900e80408c..ecc8ec0374 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog $Id$ $Source$ +2006-05-31 Marc Delisle + * libraries/common.lib.php: bug #1498108, support twice the separator + in db name, thanks to Sylvain Derosiaux + 2006-05-30 Marc Delisle * lang/french*: updates * querywindow.php: $is_superuser was not defined diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 8c94fab834..7aa4371964 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -123,7 +123,11 @@ function PMA_getDbList() && $GLOBALS['cfg']['LeftFrameDBSeparator'] && strstr($db, $GLOBALS['cfg']['LeftFrameDBSeparator'])) { - $pos = strrpos($db, $GLOBALS['cfg']['LeftFrameDBSeparator']); + // use strpos instead of strrpos; it seems more common to + // have the db name, the separator, then the rest which + // might contain a separator + // like dbname_the_rest + $pos = strpos($db, $GLOBALS['cfg']['LeftFrameDBSeparator']); $group = substr($db, 0, $pos); $disp_name_cut = substr($db, $pos); } else {