Remove unnecessary fields from bulk get, add explicit casting back to podcast item array for testing
This commit is contained in:
parent
55d5fc62a2
commit
827a83392f
|
@ -73,6 +73,10 @@ class Podcast extends BasePodcast
|
|||
|
||||
$podcastArray["episodes"] = array();
|
||||
foreach ($rss->item as $item) {
|
||||
// Same as above, we need to explicitly cast the SimpleXMLElement 'array' into an actual array
|
||||
foreach($item as $k => $v) {
|
||||
$item[$k] = (string)$v;
|
||||
}
|
||||
array_push($podcastArray["episodes"], $item);
|
||||
}
|
||||
return $podcastArray;
|
||||
|
@ -109,6 +113,10 @@ class Podcast extends BasePodcast
|
|||
|
||||
$podcastArray["episodes"] = array();
|
||||
foreach ($rss->item as $item) {
|
||||
// Same as above, we need to explicitly cast the SimpleXMLElement 'array' into an actual array
|
||||
foreach($item as $k => $v) {
|
||||
$item[$k] = (string)$v;
|
||||
}
|
||||
array_push($podcastArray["episodes"], $item);
|
||||
}
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ class Rest_PodcastController extends Zend_Rest_Controller
|
|||
case "DELETE":
|
||||
foreach($ids as $id) {
|
||||
Podcast::deleteById($id);
|
||||
$responseBody = "Success"; // TODO
|
||||
$responseBody = "Success"; // TODO: make this more descriptive
|
||||
}
|
||||
break;
|
||||
case "GET":
|
||||
|
@ -186,9 +186,6 @@ class Rest_PodcastController extends Zend_Rest_Controller
|
|||
$responseBody[] = array(
|
||||
"podcast"=>json_encode($podcast),
|
||||
"html"=>$this->view->render($path),
|
||||
"type"=>"podcast", // TODO: get rid of these extraneous fields
|
||||
"id"=>$podcast["id"]
|
||||
// "id"=>$podcast->getDbId()
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue