You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dc-rest/inc/class.rest.query.get.post.m...

27 lines
618 B
PHP

<?php
class RestQueryGetPostMetas extends RestQuery
{
public function __construct($args){
global $core;
$explodedArgs = explode("/",$args);
$this->blog_id = $explodedArgs[0];
$core->blog = new dcBlog($core, $this->blog_id);
if(!$core->blog->id){
//Le blog n'existe pas
$this->response_code = 404;
$this->response_message = array('code' => 404, 'error' => 'Resource '.$blog_id.' not found');
return;
}
$this->response_message = RestQueryGetMetas::getMetas(array('post_id'=>$explodedArgs[1]));
$this->response_code = 200;
}
}