예제 #1
0
 public function execute()
 {
     $category_id = rex_request('category_id', 'int');
     $article_id = rex_request('article_id', 'int');
     // check permissions
     if (!rex::getUser()->getComplexPerm('structure')->hasCategoryPerm($category_id)) {
         throw new rex_api_exception('user has no permission for this category!');
     }
     $result = new rex_api_result(true, rex_article_service::deleteArticle($article_id));
     return $result;
 }