Commit 113999f3 authored by Tony Emma's avatar Tony Emma
Browse files

Modification du controleur activitycontroller et l'action actoraction

parent 968ff9d9
...@@ -35,8 +35,7 @@ class ApiController extends Controller ...@@ -35,8 +35,7 @@ class ApiController extends Controller
), ),
"activitypub" => array( "activitypub" => array(
"get" => array("href" => "/ph/api/activitypub/get", "public" => true), "get" => array("href" => "/ph/api/activitypub/get", "public" => true),
"actor" => array("href"=> "/ph/api/abc/person/actor", "public" => true), "actor" => array("href"=> "/ph/api/abc/person/actor", "public" => true)
"webfinger" => array("href" => "/.well-known/webfinger","public" => true)
), ),
"organization"=> array( "organization"=> array(
"get" => array("href" => "/ph/api/organization/get", "public" => true), "get" => array("href" => "/ph/api/organization/get", "public" => true),
......
...@@ -12,7 +12,6 @@ class ActivitypubController extends ApiController { ...@@ -12,7 +12,6 @@ class ActivitypubController extends ApiController {
return array( return array(
'get' => 'api.controllers.activitypub.GetAction', 'get' => 'api.controllers.activitypub.GetAction',
'actor' => 'api.controllers.activitypub.ActorAction', 'actor' => 'api.controllers.activitypub.ActorAction',
'webfinger' => 'api.controllers.activitypub.WebfingerAction'
); );
} }
......
<?php <?php
class ActorAction extends CAction{ class ActorAction extends CAction{
public function run($id = null, $format = null, $limit=1, $index=0, $tags = null, $multiTags=null , $key = null, $insee = null) { public function run($id = null, $format = "activityStream", $limit=1, $index=0, $tags = null, $multiTags=null , $key = null, $insee = null) {
$controller=$this->getController(); $controller=$this->getController();
$bindMap = (!empty($id) ? TranslateActivityStream::$dataBinding_actor : null); $bindMap = (!empty($id) ? TranslateActivityStream::$dataBinding_actor : null);
...@@ -8,7 +9,7 @@ class ActorAction extends CAction{ ...@@ -8,7 +9,7 @@ class ActorAction extends CAction{
$result = Api::getData($bindMap, $format, Citoyen::COLLECTION, $id, $limit, $index, $tags, $multiTags, $key, $insee); $result = Api::getData($bindMap, $format, Citoyen::COLLECTION, $id, $limit, $index, $tags, $multiTags, $key, $insee);
Rest::json($result['entities'][$id]); Rest::json($result['entities'][$id],null,true,'application/activity+json; charset=utf-8');
Yii::app()->end(); Yii::app()->end();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment