cleanup new HTTP apiendpoints, added HTTPHelper and getStartEndFromRequest and updated all controllers that called their own versions of this function

This commit is contained in:
Mark Lewis 2014-11-20 17:22:53 +01:00 committed by Albert Santoni
parent 03dae5be2b
commit a27ca2f583
9 changed files with 106 additions and 212 deletions

View file

@ -279,14 +279,14 @@ class Application_Service_HistoryService
foreach ($fields as $index=>$field) {
if ($field["type"] == TEMPLATE_BOOLEAN) {
$boolCast[] = $field["name"];
$boolCast[] = $field;
}
}
foreach ($rows as $index => &$result) {
foreach ($boolCast as $name) {
$result[$name] = (bool) $result[$name];
foreach ($boolCast as $field) {
$result[$field['label']] = (bool) $result[$field['name']];
}
//need to display the results in the station's timezone.