/** * @return Result can be 0 or 1. */ public function execute() { $type = Api_Bo_Feed::RS_FBDB_FEED_TYPE_STORY; $templatized = Api_Bo_Feed::RS_FBDB_FEED_NOT_TEMPLATE; $author = $this->getUserId(); $title = $this->getApiParam('title'); $body = $this->getApiParam('body'); $image1 = $this->getApiParam('image_1'); $image1Link = $this->getApiParam('image_1_link'); $image2 = $this->getApiParam('image_2'); $image2Link = $this->getApiParam('image_2_link'); $image3 = $this->getApiParam('image_3'); $image3Link = $this->getApiParam('image_3_link'); $image4 = $this->getApiParam('image_4'); $image4Link = $this->getApiParam('image_4_link'); $titleData = $this->getApiParam('title_data'); $bodyData = $this->getApiParam('body_data'); $bodyGeneral = $this->getApiParam('body_general'); $priority = $this->getApiParam('priority'); $actor = $this->getApiParam('actor_id'); $targets = $this->getApiParam('targets'); if (null == $priority || strlen($priority) == 0) { $priority = 0; } $ret = Api_Bo_Feed::createFeed($type, $templatized, $title, $titleData, $body, $bodyData, $bodyGeneral, $author, $image1, $image1Link, $image2, $image2Link, $image3, $image3Link, $image4, $image4Link, $actor, $targets, $priority); $response = array(); if ($ret) { $response['result'] = '1'; } else { $response['result'] = '0'; } return $response; }