Exemplo n.º 1
0
 /**
  * Delete document.
  */
 public function delete()
 {
     // set document ID into request
     JRequest::setVar('cid', array($this->getModel()->searchIdByPath(JoomDOCRequest::getPath())));
     // move token from GET into POST
     if (JOOMDOC_ISJ3) {
         //fix for J3 API. JRequest::setVar not works, because JSession::checkToken uses input object...
         $app = JFactory::getApplication();
         $app->input->post->set(JRequest::getVar('token', '', 'get', 'string'), 1);
     }
     JRequest::setVar(JRequest::getVar('token', '', 'get', 'string'), 1, 'post');
     parent::delete();
     $this->setRedirect(JoomDOCRoute::viewDocuments(JoomDOCFileSystem::getParentPath(JoomDOCRequest::getPath()), false));
 }
Exemplo n.º 2
0
 /**
  * Set license's publish state.
  *
  * @return void
  */
 public function publish()
 {
     if (JoomDOCAccess::licenses()) {
         parent::publish();
     }
 }