コード例 #1
0
ファイル: documents.php プロジェクト: abdullah929/bulletin
 /**
  * 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));
 }
コード例 #2
0
ファイル: licenses.php プロジェクト: abdullah929/bulletin
 /**
  * Set license's publish state.
  *
  * @return void
  */
 public function publish()
 {
     if (JoomDOCAccess::licenses()) {
         parent::publish();
     }
 }