bug #1498108, support twice the separator in db name

This commit is contained in:
Marc Delisle 2006-05-31 16:43:45 +00:00
parent 57eaa756e0
commit 840a5b3d56
2 changed files with 9 additions and 1 deletions

View File

@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog
$Id$
$Source$
2006-05-31 Marc Delisle <lem9@users.sourceforge.net>
* libraries/common.lib.php: bug #1498108, support twice the separator
in db name, thanks to Sylvain Derosiaux
2006-05-30 Marc Delisle <lem9@users.sourceforge.net>
* lang/french*: updates
* querywindow.php: $is_superuser was not defined

View File

@ -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 {