mirror of
https://github.com/php/web-bugs.git
synced 2026-03-25 00:02:14 +01:00
- Show disabled categories (aka package) in differen background color
This commit is contained in:
@@ -188,17 +188,18 @@ function get_pseudo_packages ($project, $return_disabled = true)
|
||||
)
|
||||
);
|
||||
$tree->setup();
|
||||
|
||||
foreach ($tree->data as $data)
|
||||
{
|
||||
if (isset($data['children']))
|
||||
{
|
||||
$pseudo_pkgs[$data['name']] = $data['long_name'];
|
||||
$pseudo_pkgs[$data['name']] = array($data['long_name'], $data['disabled']);
|
||||
foreach ($data['children'] as $child)
|
||||
{
|
||||
$pseudo_pkgs[$child['name']] = " {$child['long_name']}";
|
||||
$pseudo_pkgs[$child['name']] = array(" {$child['long_name']}", $child['disabled']);
|
||||
}
|
||||
} else if (!isset($pseudo_pkgs[$data['name']]))
|
||||
$pseudo_pkgs[$data['name']] = $data['long_name'];
|
||||
$pseudo_pkgs[$data['name']] = array($data['long_name'], $data['disabled']);
|
||||
}
|
||||
|
||||
return $pseudo_pkgs;
|
||||
@@ -611,7 +612,7 @@ function show_types($current, $show_any, $default = '')
|
||||
$list = $dbh->prepare($sql)->execute(array($site))->fetchCol();
|
||||
|
||||
foreach ($list as $name) {
|
||||
$bug_items[$name] = $name;
|
||||
$bug_items[$name] = array($name, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -637,7 +638,8 @@ function show_types($current, $show_any, $default = '')
|
||||
{
|
||||
echo ' selected="selected"';
|
||||
}
|
||||
echo ">$value</option>\n";
|
||||
// Show disabled categories with different background color in listing
|
||||
echo (($value[1]) ? ' style="background-color:#eee;"' : ''), ">{$value[0]}</option>\n";
|
||||
if ($key == $current) {
|
||||
$use++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user