Commit 756d0d16 authored by Wouter Wolters's avatar Wouter Wolters Committed by Tymoteusz Motylewski
Browse files

[TASK] Replace TCEmain with the new naming DataHandler

The old class name is still in use in the core, replace them
with the new name DataHandler.

Resolves: #78550
Releases: master
Change-Id: I324e7b3037f8bf8df70d5c8db37d62a01ed710a4
Reviewed-on: https://review.typo3.org/50485


Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Tymoteusz Motylewski's avatarTymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski's avatarTymoteusz Motylewski <t.motylewski@gmail.com>
parent 277a10b4
......@@ -508,7 +508,7 @@ class EditDocumentController extends AbstractModule
}
/**
* Do processing of data, submitting it to TCEmain.
* Do processing of data, submitting it to DataHandler.
*
* @return void
*/
......@@ -548,7 +548,7 @@ class EditDocumentController extends AbstractModule
if ($beUser->uc['neverHideAtCopy']) {
$tce->neverHideAtCopy = 1;
}
// Loading TCEmain with data:
// Loading DataHandler with data:
$tce->start($this->data, $this->cmd);
if (is_array($this->mirror)) {
$tce->setMirror($this->mirror);
......@@ -572,7 +572,7 @@ class EditDocumentController extends AbstractModule
);
debug('Error: Referer host did not match with server host.');
} else {
// Perform the saving operation with TCEmain:
// Perform the saving operation with DataHandler:
$tce->process_uploads($_FILES);
$tce->process_datamap();
$tce->process_cmdmap();
......@@ -1822,7 +1822,7 @@ class EditDocumentController extends AbstractModule
// If the record is already a version of "something" pass it by.
if ($reqRecord['pid'] == -1) {
// (If it turns out not to be a version of the current workspace there will be trouble, but
// that is handled inside TCEmain then and in the interface it would clearly be an error of
// that is handled inside DataHandler then and in the interface it would clearly be an error of
// links if the user accesses such a scenario)
return $reqRecord;
} else {
......
......@@ -29,7 +29,7 @@ use TYPO3\CMS\Core\Utility\MathUtility;
* sending the posted data to the object.
*
* Used by many smaller forms/links in TYPO3, including the QuickEdit module.
* Is not used by FormEngine though (main form rendering script) - that uses the same class (TCEmain) but makes its own initialization (to save the redirect request).
* Is not used by FormEngine though (main form rendering script) - that uses the same class (DataHandler) but makes its own initialization (to save the redirect request).
* For all other cases than FormEngine it is recommended to use this script for submitting your editing forms - but the best solution in any case would probably be to link your application to FormEngine, that will give you easy form-rendering as well.
*/
class SimpleDataHandlerController
......@@ -140,7 +140,7 @@ class SimpleDataHandlerController
$this->CB = GeneralUtility::_GP('CB');
$this->vC = GeneralUtility::_GP('vC');
$this->uPT = GeneralUtility::_GP('uPT');
// Creating TCEmain object
// Creating DataHandler object
$this->tce = GeneralUtility::makeInstance(DataHandler::class);
// Configuring based on user prefs.
if ($beUser->uc['recursiveDelete']) {
......@@ -196,7 +196,7 @@ class SimpleDataHandlerController
*/
public function main()
{
// LOAD TCEmain with data and cmd arrays:
// LOAD DataHandler with data and cmd arrays:
$this->tce->start($this->data, $this->cmd);
if (is_array($this->mirror)) {
$this->tce->setMirror($this->mirror);
......
......@@ -40,7 +40,7 @@ class AddController extends AbstractWizardController
public $content;
/**
* If set, the TCEmain class is loaded and used to add the returning ID to the parent record.
* If set, the DataHandler class is loaded and used to add the returning ID to the parent record.
*
* @var int
*/
......
......@@ -795,7 +795,7 @@ abstract class AbstractFormElement extends AbstractNode
}
} else {
// If all is allowed, insert all: (This does NOT respect any disallowed extensions,
// but those will be filtered away by the backend TCEmain)
// but those will be filtered away by the backend DataHandler)
$output = $elFromTable;
}
break;
......
......@@ -187,7 +187,7 @@ class Commands
}
/**
* Process TCEMAIN commands and data maps
* Process DataHandler commands and data maps
*
* Command Map:
* Used for moving, recover, remove and some more operations.
......
......@@ -952,7 +952,7 @@ class BackendUtility
* @param string $table The table name
* @param string $fieldName Optional fieldname passed to hook object
* @param bool $WSOL If set, workspace overlay is applied to records. This is correct behaviour for all presentation and export, but NOT if you want a TRUE reflection of how things are in the live workspace.
* @param int $newRecordPidValue SPECIAL CASES: Use this, if the DataStructure may come from a parent record and the INPUT row doesn't have a uid yet (hence, the pid cannot be looked up). Then it is necessary to supply a PID value to search recursively in for the DS (used from TCEmain)
* @param int $newRecordPidValue SPECIAL CASES: Use this, if the DataStructure may come from a parent record and the INPUT row doesn't have a uid yet (hence, the pid cannot be looked up). Then it is necessary to supply a PID value to search recursively in for the DS (used from DataHandler)
* @return mixed If array, the data structure was found and returned as an array. Otherwise (string) it is an error message.
* @todo: All those nasty details should be covered with tests, also it is very unfortunate the final $srcPointer is not exposed
*/
......
......@@ -212,7 +212,7 @@ class CategoryCollection extends AbstractRecordCollection implements EditableCol
/**
* Returns an array of the persistable properties and contents
* which are processable by TCEmain.
* which are processable by DataHandler.
* for internal usage in persist only.
*
* @return array
......
......@@ -382,7 +382,7 @@ abstract class AbstractRecordCollection implements RecordCollectionInterface, Pe
/**
* Returns an array of the persistable properties and contents
* which are processable by TCEmain.
* which are processable by DataHandler.
*
* For internal usage in persist only.
*
......@@ -391,9 +391,9 @@ abstract class AbstractRecordCollection implements RecordCollectionInterface, Pe
abstract protected function getPersistableDataArray();
/**
* Generates comma-separated list of entry uids for usage in TCEmain
* Generates comma-separated list of entry uids for usage in DataHandler
*
* also allow to add table name, if it might be needed by TCEmain for
* also allow to add table name, if it might be needed by DataHandler for
* storing the relation
*
* @param bool $includeTableName
......
......@@ -83,7 +83,7 @@ class StaticRecordCollection extends AbstractRecordCollection implements Editabl
/**
* Returns an array of the persistable properties and contents
* which are processable by TCEmain.
* which are processable by DataHandler.
*
* for internal usage in persist only.
*
......
......@@ -3398,7 +3398,7 @@ class DataHandler
if ($GLOBALS['TCA'][$table]['ctrl']['origUid']) {
$data[$table][$theNewID][$GLOBALS['TCA'][$table]['ctrl']['origUid']] = $uid;
}
// Do the copy by simply submitting the array through TCEmain:
// Do the copy by simply submitting the array through DataHandler:
/** @var $copyTCE DataHandler */
$copyTCE = $this->getLocalTCE();
$copyTCE->start($data, '', $this->BE_USER);
......@@ -3584,7 +3584,7 @@ class DataHandler
/**
* Copying records, but makes a "raw" copy of a record.
* Basically the only thing observed is field processing like the copying of files and correction of ids. All other fields are 1-1 copied.
* Technically the copy is made with THIS instance of the tcemain class contrary to copyRecord() which creates a new instance and uses the processData() function.
* Technically the copy is made with THIS instance of the DataHandler class contrary to copyRecord() which creates a new instance and uses the processData() function.
* The copy is created by insertNewCopyVersion() which bypasses most of the regular input checking associated with processData() - maybe copyRecord() should even do this as well!?
* This function is used to create new versions of a record.
* NOTICE: DOES NOT CHECK PERMISSIONS to create! And since page permissions are just passed through and not changed to the user who executes the copy we cannot enforce permissions without getting an incomplete copy - unless we change permissions of course.
......@@ -3722,7 +3722,7 @@ class DataHandler
*/
public function copyRecord_procBasedOnFieldType($table, $uid, $field, $value, $row, $conf, $realDestPid, $language = 0, array $workspaceOptions = [])
{
// Process references and files, currently that means only the files, prepending absolute paths (so the TCEmain engine will detect the file as new and one that should be made into a copy)
// Process references and files, currently that means only the files, prepending absolute paths (so the DataHandler engine will detect the file as new and one that should be made into a copy)
$value = $this->copyRecord_procFilesRefs($conf, $uid, $value);
$inlineSubType = $this->getInlineFieldType($conf);
// Get the localization mode for the current (parent) record (keep|select):
......@@ -3965,7 +3965,7 @@ class DataHandler
}
}
}
// Implode the new filelist into the new value (all files have absolute paths now which means they will get copied when entering TCEmain as new values...)
// Implode the new filelist into the new value (all files have absolute paths now which means they will get copied when entering DataHandler as new values...)
$value = implode(',', $newValue);
// Return the new value:
......@@ -6106,7 +6106,7 @@ class DataHandler
* @param string $table Table name of the parent record
* @param int $id Uid of the parent record
* @param array $incomingFieldArray Reference to the incomingFieldArray of process_datamap
* @param array $registerDBList Reference to the $registerDBList array that was created/updated by versionizing calls to TCEmain in process_datamap.
* @param array $registerDBList Reference to the $registerDBList array that was created/updated by versionizing calls to DataHandler in process_datamap.
* @return void
*/
public function getVersionizedIncomingFieldArray($table, $id, &$incomingFieldArray, &$registerDBList)
......@@ -8321,7 +8321,7 @@ class DataHandler
*
*****************************/
/**
* Logging actions from TCEmain
* Logging actions from DataHandler
*
* @param string $table Table name the log entry is concerned with. Blank if NA
* @param int $recuid Record UID. Zero if NA
......
......@@ -15,7 +15,7 @@ namespace TYPO3\CMS\Core\DataHandling;
*/
/**
* Interface for classes which hook into TCEmain and do additional processing
* Interface for classes which hook into DataHandler and do additional processing
* after the upload of a file.
*/
interface DataHandlerProcessUploadHookInterface
......
......@@ -835,9 +835,9 @@ class RelationHandler
$this->updateRefIndex($pair[0], $pair[1]);
}
}
// Update ref index; In tcemain it is not certain that this will happen because
// Update ref index; In DataHandler it is not certain that this will happen because
// if only the MM field is changed the record itself is not updated and so the ref-index is not either.
// This could also have been fixed in updateDB in tcemain, however I decided to do it here ...
// This could also have been fixed in updateDB in DataHandler, however I decided to do it here ...
$this->updateRefIndex($this->currentTable, $uid);
}
}
......@@ -1311,7 +1311,7 @@ class RelationHandler
/**
* Update Reference Index (sys_refindex) for a record
* Should be called any almost any update to a record which could affect references inside the record.
* (copied from TCEmain)
* (copied from DataHandler)
*
* @param string $table Table name
* @param int $id Record UID
......
......@@ -108,7 +108,7 @@ class RteHtmlParser extends HtmlParser
**********************************************/
/**
* Transform value for RTE based on specConf in the direction specified by $direction (rte/db)
* This is the main function called from tcemain and transfer data classes
* This is the main function called from DataHandler and transfer data classes
*
* @param string $value Input value
* @param array $specConf Special configuration for a field; This is coming from the types-configuration of the field in the TCA. In the types-configuration you can setup features for the field rendering and in particular the RTE takes al its major configuration options from there!
......
......@@ -27,7 +27,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*
* Depends on \TYPO3\CMS\Core\Database\RelationHandler
*
* @todo Need to really extend this class when the tcemain library has been updated and the whole API is better defined. There are some known bugs in this library. Further it would be nice with a facility to not only analyze but also clean up!
* @todo Need to really extend this class when the DataHandler library has been updated and the whole API is better defined. There are some known bugs in this library. Further it would be nice with a facility to not only analyze but also clean up!
* @see \TYPO3\CMS\Lowlevel\View\DatabaseIntegrityView::func_relations(), \TYPO3\CMS\Lowlevel\View\DatabaseIntegrityView::func_records()
*/
class DatabaseIntegrityCheck
......
......@@ -93,7 +93,7 @@ abstract class AbstractFileCollection extends \TYPO3\CMS\Core\Collection\Abstrac
}
/**
* Generates comma-separated list of entry uids for usage in TCEmain
* Generates comma-separated list of entry uids for usage in DataHandler
*
* @param bool $includeTableName
* @return string
......@@ -110,7 +110,7 @@ abstract class AbstractFileCollection extends \TYPO3\CMS\Core\Collection\Abstrac
/**
* Returns an array of the persistable properties and contents
* which are processable by TCEmain.
* which are processable by DataHandler.
*
* @return array
*/
......
......@@ -85,7 +85,7 @@ class FolderBasedFileCollection extends AbstractFileCollection
/**
* Returns an array of the persistable properties and contents
* which are processable by TCEmain.
* which are processable by DataHandler.
*
* @return array
*/
......
......@@ -39,13 +39,13 @@ class FileExtensionFilter
protected $disallowedFileExtensions = null;
/**
* Entry method for use as TCEMain "inline" field filter
* Entry method for use as DataHandler "inline" field filter
*
* @param array $parameters
* @param DataHandler $tceMain
* @param DataHandler $dataHandler
* @return array
*/
public function filterInlineChildren(array $parameters, DataHandler $tceMain)
public function filterInlineChildren(array $parameters, DataHandler $dataHandler)
{
$values = $parameters['values'];
if ($parameters['allowedFileExtensions']) {
......@@ -68,7 +68,7 @@ class FileExtensionFilter
$cleanValues[] = $value;
} else {
// Remove the erroneously created reference record again
$tceMain->deleteAction('sys_file_reference', $fileReferenceUid);
$dataHandler->deleteAction('sys_file_reference', $fileReferenceUid);
}
}
}
......
......@@ -30,7 +30,7 @@ use TYPO3\CMS\Extbase\SignalSlot\Dispatcher;
/**
* Repository Class as an abstraction layer to sys_file
*
* Every access to table sys_file_metadata which is not handled by TCEmain
* Every access to table sys_file_metadata which is not handled by DataHandler
* has to use this Repository class.
*
* This is meant for FAL internal use only!.
......
......@@ -29,7 +29,7 @@ use TYPO3\CMS\Extbase\SignalSlot\Dispatcher;
/**
* Repository Class as an abstraction layer to sys_file_metadata
*
* Every access to table sys_file_metadata which is not handled by TCEmain
* Every access to table sys_file_metadata which is not handled by DataHandler
* has to use this Repository class
*/
class MetaDataRepository implements SingletonInterface
......
......@@ -2729,7 +2729,7 @@ class ResourceStorage implements ResourceStorageInterface
/**
* Returns the destination path/fileName of a unique fileName/foldername in that path.
* If $theFile exists in $theDest (directory) the file have numbers appended up to $this->maxNumber. Hereafter a unique string will be appended.
* This function is used by fx. TCEmain when files are attached to records and needs to be uniquely named in the uploads/* folders
* This function is used by fx. DataHandler when files are attached to records and needs to be uniquely named in the uploads/* folders
*
* @param Folder $folder
* @param string $theFile The input fileName to check
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment