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:
parent
5420de75b4
commit
b9f6b512a9
|
@ -22,21 +22,29 @@ global $result_status;
|
||||||
global $result_groups;
|
global $result_groups;
|
||||||
global $result_resolutions;
|
global $result_resolutions;
|
||||||
|
|
||||||
foreach($result_status['status'] as $st) {
|
if (isset ($result_status['status'])){
|
||||||
$status[$st['id']] = $st['name'];
|
|
||||||
|
foreach($result_status['status'] as $st) {
|
||||||
|
$status[$st['id']] = $st['name'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add special status cases
|
// Add special status cases
|
||||||
$status[0] = __('Any');
|
$status[0] = __('Any');
|
||||||
$status[-10] = __('Not closed');
|
$status[-10] = __('Not closed');
|
||||||
|
|
||||||
foreach($result_groups['group'] as $gr) {
|
if (isset ($result_groups['group'])){
|
||||||
$groups[$gr['id']] = $gr['name'];
|
foreach($result_groups['group'] as $gr) {
|
||||||
|
$groups[$gr['id']] = $gr['name'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$resolutions[0] = __('None');
|
$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">';
|
echo '<form method="post">';
|
||||||
|
@ -60,7 +68,9 @@ echo '<td>';
|
||||||
html_print_select ($status, 'search_status', $search_status, '', '', 0, false);
|
html_print_select ($status, 'search_status', $search_status, '', '', 0, false);
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '<td>';
|
echo '<td>';
|
||||||
|
if (isset($groups)){
|
||||||
html_print_select ($groups, 'search_group', $search_group, '', '', 0, false, false, false);
|
html_print_select ($groups, 'search_group', $search_group, '', '', 0, false, false, false);
|
||||||
|
}
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '<td>';
|
echo '<td>';
|
||||||
html_print_submit_button (__('Search'));
|
html_print_submit_button (__('Search'));
|
||||||
|
|
Loading…
Reference in New Issue