shorten the path of db subtree items

This commit is contained in:
Marc Delisle
2005-08-11 13:01:49 +00:00
parent 948ae23a42
commit 5ca5c9333d
2 changed files with 10 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-08-11 Marc Delisle <lem9@users.sourceforge.net>
* queryframe.php: shorten the path of db subtree items,
thanks to Edward Rudd - urkle
2005-08-09 Marc Delisle <lem9@users.sourceforge.net>
* read_dump.php: add unique numbers to $strFileCouldNotBeRead to
improve support when someone gets this error

View File

@@ -360,6 +360,7 @@ if ($num_dbs > 1) {
$selected = '';
} // end if... else...
$db_disp = $db;
if ($cfg['LeftFrameDBTree']) {
if ($i == 0) {
$parts = explode($cfg['LeftFrameDBSeparator'],$db,2);
@@ -376,16 +377,19 @@ if ($num_dbs > 1) {
. '<optgroup label="'.htmlspecialchars($parts[0]).'">'."\n";
$parent = $parts[0];
}
if (count($parts) > 1 && $parent == $parts[0]) {
$db_disp = $parts[1];
}
}
if (!empty($num_tables)) {
echo ' '
. '<option value="' . htmlspecialchars($db) . '"' . $selected . '>'
. ($db_tooltip != '' && $cfg['ShowTooltipAliasDB'] ? htmlspecialchars($db_tooltip) : htmlspecialchars($db)) . ' (' . $num_tables . ')</option>' . "\n";
. ($db_tooltip != '' && $cfg['ShowTooltipAliasDB'] ? htmlspecialchars($db_tooltip) : htmlspecialchars($cfg['LeftFrameDBSeparator'] . $db_disp)) . ' (' . $num_tables . ')</option>' . "\n";
} else {
echo ' '
. '<option value="' . htmlspecialchars($db) . '"' . $selected . '>'
. ($db_tooltip != '' && $cfg['ShowTooltipAliasDB'] ? htmlspecialchars($db_tooltip) : htmlspecialchars($db)) . ' (-)</option>' . "\n";
. ($db_tooltip != '' && $cfg['ShowTooltipAliasDB'] ? htmlspecialchars($db_tooltip) : htmlspecialchars($cfg['LeftFrameDBSeparator'] . $db_disp)) . ' (-)</option>' . "\n";
} // end if... else...
if ($cfg['LeftFrameDBTree']) {