Improved the output of the function "planned_downtimes_get_malformed"

This commit is contained in:
Alejandro Gallardo Escobar 2014-10-08 18:50:09 +02:00
parent 3100189344
commit 897cd047d2
1 changed files with 10 additions and 0 deletions

View File

@ -248,6 +248,16 @@ function planned_downtimes_get_malformed () {
AND periodically_time_from >= periodically_time_to))";
$malformed_downtimes = db_get_all_rows_sql($sql);
if ($malformed_downtimes === false) {
return false;
}
$malformed_downtimes_aux = array();
foreach ($malformed_downtimes as $malformed_downtime) {
$malformed_downtimes_aux[$malformed_downtime['id']] = $malformed_downtime;
}
$malformed_downtimes = $malformed_downtimes_aux;
return $malformed_downtimes;
}