2011-07-28 Tomas Palacios <tomas.palacios@artica.es>

* operation/integria_incidents/incident.list.php: fixed a bug
        regarding an empty foreach and an undefined variable call.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4647 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Aldrioth 2011-07-28 18:12:11 +00:00
parent 5420de75b4
commit b9f6b512a9
1 changed files with 16 additions and 6 deletions

View File

@ -22,21 +22,29 @@ global $result_status;
global $result_groups;
global $result_resolutions;
foreach($result_status['status'] as $st) {
$status[$st['id']] = $st['name'];
if (isset ($result_status['status'])){
foreach($result_status['status'] as $st) {
$status[$st['id']] = $st['name'];
}
}
// Add special status cases
$status[0] = __('Any');
$status[-10] = __('Not closed');
foreach($result_groups['group'] as $gr) {
$groups[$gr['id']] = $gr['name'];
if (isset ($result_groups['group'])){
foreach($result_groups['group'] as $gr) {
$groups[$gr['id']] = $gr['name'];
}
}
$resolutions[0] = __('None');
foreach($result_resolutions['resolution'] as $res) {
$resolutions[$res['id']] = $res['name'];
if (isset ($result_resolutions['resolution'])){
foreach($result_resolutions['resolution'] as $res) {
$resolutions[$res['id']] = $res['name'];
}
}
echo '<form method="post">';
@ -60,7 +68,9 @@ echo '<td>';
html_print_select ($status, 'search_status', $search_status, '', '', 0, false);
echo '</td>';
echo '<td>';
if (isset($groups)){
html_print_select ($groups, 'search_group', $search_group, '', '', 0, false, false, false);
}
echo '</td>';
echo '<td>';
html_print_submit_button (__('Search'));