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
),
"activitypub" => array(
"get" => array("href" => "/ph/api/activitypub/get", "public" => true),
"actor" => array("href"=> "/ph/api/abc/person/actor", "public" => true),
"webfinger" => array("href" => "/.well-known/webfinger","public" => true)
"actor" => array("href"=> "/ph/api/abc/person/actor", "public" => true)
),
"organization"=> array(
"get" => array("href" => "/ph/api/organization/get", "public" => true),
......
......@@ -12,7 +12,6 @@ class ActivitypubController extends ApiController {
return array(
'get' => 'api.controllers.activitypub.GetAction',
'actor' => 'api.controllers.activitypub.ActorAction',
'webfinger' => 'api.controllers.activitypub.WebfingerAction'
);
}
......
<?php
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();
$bindMap = (!empty($id) ? TranslateActivityStream::$dataBinding_actor : null);
......@@ -8,7 +9,7 @@ class ActorAction extends CAction{
$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();
}
......
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