Fixed array_map over query instances

This commit is contained in:
Rudi Grinberg 2012-09-12 12:09:38 -04:00
parent d194ff1809
commit ad75849a6f
1 changed files with 10 additions and 6 deletions

View File

@ -792,9 +792,11 @@ SQL;
array( ':showId' => $this->getId(),
':timestamp' => gmdate("Y-m-d H:i:s")), "all");
return array_map( function($i) {
return $i['id'];
}, $rows);
$res = array();
foreach ($rows as $r) {
$res[] = $r['id'];
}
return $res;
}
/* Called when a show's duration is changed (edited).
@ -892,9 +894,11 @@ SQL;
{
$showDays = CcShowDaysQuery::create()->filterByDbShowId(
$this->getId())->find();
return array_map( function($showDay) {
return $showDay->getDbDay();
}, $showDays);
$res = array();
foreach ($showDays as $showDay) {
$res[] = $showDay->getDbDay();
}
return $res;
}
/* Only used for shows that aren't repeating.