/** * 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'); } } }
/** * Saves a record based on its data array. * * @param string $table The table name for the record to save. * @param integer $uid The UID for the record to save. * @return void */ public function doSave($table, $uid) { $data = $this->TSFE_EDIT['data']; if (!empty($data)) { $this->initializeTceMain(); $this->tce->start($data, array()); $this->tce->process_uploads($_FILES); $this->tce->process_datamap(); // Save the new UID back into TSFE_EDIT $newUID = $this->tce->substNEWwithIDs['NEW']; if ($newUID) { $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT['newUID'] = $newUID; } } }