Override Podcast->fromArray
This commit is contained in:
parent
c166b4f00e
commit
40d0619f10
2 changed files with 29 additions and 15 deletions
|
@ -278,19 +278,11 @@ class Application_Service_PodcastService
|
|||
throw new PodcastNotFoundException();
|
||||
}
|
||||
|
||||
self::removePrivateFields($data);
|
||||
self::validatePodcastMetadata($data);
|
||||
self::removePrivateFields($data["podcast"]);
|
||||
self::validatePodcastMetadata($data["podcast"]);
|
||||
|
||||
$importedPodcast = ImportedPodcastQuery::create()->filterByDbPodcastId($podcast->getDbId())->findOne();
|
||||
if (!is_null($importedPodcast)) {
|
||||
$importedPodcast->fromArray($data, BasePeer::TYPE_FIELDNAME);
|
||||
$importedPodcast->save();
|
||||
} else {
|
||||
//TODO: station podcast
|
||||
}
|
||||
|
||||
//$podcast->fromArray($data, BasePeer::TYPE_FIELDNAME);
|
||||
//$podcast->save();
|
||||
$podcast->fromArray($data["podcast"], BasePeer::TYPE_FIELDNAME);
|
||||
$podcast->save();
|
||||
|
||||
return $podcast->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue