2010-10-07 Sancho Lerena <slerena@artica.es>
* godmode/alerts/alert_list.list.php: Another ugly warning fixed due an undefined array. PLEASE dont use foreach on arrays non-checked ! git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
24dd478a46
commit
7109acb41a
|
@ -1,5 +1,8 @@
|
|||
2010-10-07 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* godmode/alerts/alert_list.list.php: Another ugly warning fixed due
|
||||
an undefined array. PLEASE dont use foreach on arrays non-checked !
|
||||
|
||||
* godmode/agentes/configurar_agente.php: Added custom fields to the global
|
||||
edit/insert code. Not really used here, but for the future.
|
||||
|
||||
|
|
|
@ -44,9 +44,14 @@ $form_filter .= print_input_text ('template_name', $templateName, '', 12, 255, t
|
|||
$form_filter .= "</td>\n";
|
||||
$temp = get_agents();
|
||||
$arrayAgents = array();
|
||||
foreach ($temp as $agentElement) {
|
||||
$arrayAgents[$agentElement['id_agente']] = $agentElement['nombre'];
|
||||
|
||||
# Avoid empty arrays, warning messages are UGLY !
|
||||
if ($temp){
|
||||
foreach ($temp as $agentElement) {
|
||||
$arrayAgents[$agentElement['id_agente']] = $agentElement['nombre'];
|
||||
}
|
||||
}
|
||||
|
||||
$form_filter .= "<td>".__('Agents')."</td><td>";
|
||||
$form_filter .= print_input_text_extended ('agent_name', $agentName, 'text-agent_name', '', 12, 100, false, '',
|
||||
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true);
|
||||
|
|
Loading…
Reference in New Issue