Skip to content

Commit c291de3

Browse files
Add showEmptyNamespaceAsKey and make <empty> grey
1 parent feed670 commit c291de3

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

css/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ margin-top: .05em;
4444
cursor: pointer;
4545
}
4646

47+
#keys li.empty a {
48+
color: #888;
49+
}
50+
4751
#keys li.current a {
4852
background-color: #eee;
4953
}

includes/config.sample.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939

4040
'seperator' => ':',
41+
'showEmptyNamespaceAsKey' => false,
4142

4243
// Hide empty databases in the database list (global, valid for all servers unless set at server level)
4344
'hideEmptyDBs' => false,

index.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
}
3535

3636
$key = explode($server['seperator'], $key);
37+
if ($key[count($key) - 1] == '' && $config['showEmptyNamespaceAsKey']) {
38+
array_pop($key);
39+
$key[count($key) - 1] .= ':';
40+
}
3741

3842
// $d will be a reference to the current namespace.
3943
$d = &$namespaces;
@@ -98,6 +102,7 @@ function print_namespace($item, $name, $fullkey, $islast) {
98102

99103
if (empty($name) && $name != '0') {
100104
$name = '<empty>';
105+
$class[] = 'empty';
101106
}
102107

103108
?>

0 commit comments

Comments
 (0)