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

View file

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