/**
  * Delete an article
  *
  * @param \thebuggenie\core\framework\Request $request
  */
 public function runDeleteArticle(framework\Request $request)
 {
     try {
         if (!$this->article instanceof Article) {
             throw new \Exception($this->getI18n()->__('This article does not exist'));
         }
         if (!framework\Context::getModule('publish')->canUserDeleteArticle($this->article->getName())) {
             throw new \Exception($this->getI18n()->__('You do not have permission to delete this article'));
         }
         if (!$request['article_name']) {
             throw new \Exception($this->getI18n()->__('Please specify an article name'));
         } else {
             Article::deleteByName($request['article_name']);
         }
     } catch (\Exception $e) {
         $this->getResponse()->setHttpStatus(400);
         return $this->renderJSON(array('title' => $this->getI18n()->__('An error occured'), 'error' => $e->getMessage()));
     }
     return $this->renderJSON(array('message' => $this->getI18n()->__('The article was deleted')));
 }