rfe #1821619 LeftFrameDBSeparator can be an array
This commit is contained in:
@@ -11,6 +11,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
- rfe #2100910 configurable default charset for import
|
- rfe #2100910 configurable default charset for import
|
||||||
- rfe #1913541 link to InnoDB status when error 1005 occurs
|
- rfe #1913541 link to InnoDB status when error 1005 occurs
|
||||||
- rfe #1927189 strip ` from column names on import
|
- rfe #1927189 strip ` from column names on import
|
||||||
|
- rfe #1821619 LeftFrameDBSeparator can be an array
|
||||||
|
|
||||||
3.1.1.0 (not yet released)
|
3.1.1.0 (not yet released)
|
||||||
- patch #2242765 [core] Navi panel server links wrong,
|
- patch #2242765 [core] Navi panel server links wrong,
|
||||||
|
@@ -1271,9 +1271,11 @@ ALTER TABLE `pma_column_comments`
|
|||||||
<a href="#cfg_LeftFrameDBSeparator" class="configrule">$cfg['LeftFrameDBSeparator']</a>.
|
<a href="#cfg_LeftFrameDBSeparator" class="configrule">$cfg['LeftFrameDBSeparator']</a>.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt id="cfg_LeftFrameDBSeparator">$cfg['LeftFrameDBSeparator'] string</dt>
|
<dt id="cfg_LeftFrameDBSeparator">$cfg['LeftFrameDBSeparator']
|
||||||
|
string or array</dt>
|
||||||
<dd>The string used to separate the parts of the database name when showing
|
<dd>The string used to separate the parts of the database name when showing
|
||||||
them in a tree.</dd>
|
them in a tree. Alternatively you can specify more strings in an array
|
||||||
|
and all of them will be used as a separator.</dd>
|
||||||
|
|
||||||
<dt id="cfg_LeftFrameTableSeparator">$cfg['LeftFrameTableSeparator'] string</dt>
|
<dt id="cfg_LeftFrameTableSeparator">$cfg['LeftFrameTableSeparator'] string</dt>
|
||||||
<dd>Defines a string to be used to nest table spaces. Defaults to '__'.
|
<dd>Defines a string to be used to nest table spaces. Defaults to '__'.
|
||||||
|
@@ -278,6 +278,16 @@ require_once './libraries/List.class.php';
|
|||||||
$db_tooltips = PMA_getDbComments();
|
$db_tooltips = PMA_getDbComments();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$GLOBALS['cfg']['LeftFrameDBTree']) {
|
||||||
|
$separators = array();
|
||||||
|
} elseif (is_array($GLOBALS['cfg']['LeftFrameDBSeparator'])) {
|
||||||
|
$separators = $GLOBALS['cfg']['LeftFrameDBSeparator'];
|
||||||
|
} elseif (!empty($GLOBALS['cfg']['LeftFrameDBSeparator'])) {
|
||||||
|
$separators = array($GLOBALS['cfg']['LeftFrameDBSeparator']);
|
||||||
|
} else {
|
||||||
|
$separators = array();
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($this->getLimitedItems($offset, $count) as $key => $db) {
|
foreach ($this->getLimitedItems($offset, $count) as $key => $db) {
|
||||||
// garvin: Get comments from PMA comments table
|
// garvin: Get comments from PMA comments table
|
||||||
$db_tooltip = '';
|
$db_tooltip = '';
|
||||||
@@ -286,15 +296,21 @@ require_once './libraries/List.class.php';
|
|||||||
$db_tooltip = $_db_tooltips[$db];
|
$db_tooltip = $_db_tooltips[$db];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GLOBALS['cfg']['LeftFrameDBTree']
|
$pos = false;
|
||||||
&& $GLOBALS['cfg']['LeftFrameDBSeparator']
|
|
||||||
&& strstr($db, $GLOBALS['cfg']['LeftFrameDBSeparator']))
|
foreach($separators as $separator) {
|
||||||
{
|
|
||||||
// use strpos instead of strrpos; it seems more common to
|
// use strpos instead of strrpos; it seems more common to
|
||||||
// have the db name, the separator, then the rest which
|
// have the db name, the separator, then the rest which
|
||||||
// might contain a separator
|
// might contain a separator
|
||||||
// like dbname_the_rest
|
// like dbname_the_rest
|
||||||
$pos = strpos($db, $GLOBALS['cfg']['LeftFrameDBSeparator']);
|
$pos = strpos($db, $separator);
|
||||||
|
|
||||||
|
if ($pos !== false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($pos !== false) {
|
||||||
$group = substr($db, 0, $pos);
|
$group = substr($db, 0, $pos);
|
||||||
$disp_name_cut = substr($db, $pos);
|
$disp_name_cut = substr($db, $pos);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user