Пример #1
0
 /**
  * @param int $id
  */
 public function deleteAction($id)
 {
     $GLOBALS['TYPO3_DB']->exec_DELETEquery('link_cache', 'id = ' . (int) $id);
     $this->dataHandler->start(NULL, NULL);
     $this->dataHandler->clear_cacheCmd('all');
     $this->addFlashMessage('A link has been removed from cache, please reload page where the link is present (not the page itself, but e.g. parent page with this link in menu) in order to generate it again.');
     $this->redirect('list');
 }
 /**
  * Executing the posted actions ...
  *
  * @return void
  * @todo Define visibility
  */
 public function main()
 {
     // LOAD TCEmain with data and cmd arrays:
     $this->tce->start($this->data, $this->cmd);
     if (is_array($this->mirror)) {
         $this->tce->setMirror($this->mirror);
     }
     // Checking referer / executing
     $refInfo = parse_url(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_REFERER'));
     $httpHost = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
     if ($httpHost != $refInfo['host'] && $this->vC != $GLOBALS['BE_USER']->veriCode() && !$GLOBALS['TYPO3_CONF_VARS']['SYS']['doNotCheckReferer']) {
         $this->tce->log('', 0, 0, 0, 1, 'Referer host "%s" and server host "%s" did not match and veriCode was not valid either!', 1, array($refInfo['host'], $httpHost));
     } else {
         // Register uploaded files
         $this->tce->process_uploads($_FILES);
         // Execute actions:
         $this->tce->process_datamap();
         $this->tce->process_cmdmap();
         // Clearing cache:
         $this->tce->clear_cacheCmd($this->cacheCmd);
         // Update page tree?
         if ($this->uPT && (isset($this->data['pages']) || isset($this->cmd['pages']))) {
             \TYPO3\CMS\Backend\Utility\BackendUtility::setUpdateSignal('updatePageTree');
         }
     }
 }
Пример #3
0
 /**
  * Clear the system cache
  *
  * @return void
  */
 public function clearSystemCache()
 {
     $this->dataHandler->clear_cacheCmd('system');
 }