[TASK] Rename usage of Core\DataHandler\DataHandler
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 20 Sep 2012 11:01:22 +0000 (13:01 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 20 Sep 2012 11:45:17 +0000 (13:45 +0200)
Old t3lib_tcemain was renamed to Core\DataHandler\DataHandling, but should
have been Core\DataHandling\DataHandler instead, located beside the other
classes and hook interfaces. The patch changes all usages in EXT:version.

Change-Id: I3ca90294b18af52f94e1cb5f89234eec70cd00c3
Resolves: #41095
Related: #41094
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14759
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/version/Classes/Controller/VersionModuleController.php
typo3/sysext/version/Classes/Controller/WorkspaceModuleController.php
typo3/sysext/version/Classes/DataHandler/CommandMap.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/version/Classes/Utility/WorkspacesUtility.php

index 5d4279f..c2392b0 100644 (file)
@@ -1442,7 +1442,7 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                                $wslibObj = \t3lib_div::makeInstance('TYPO3\\CMS\\Version\\Utility\\WorkspacesUtility');
                                $cmd = $wslibObj->getCmdArrayForPublishWS($GLOBALS['BE_USER']->workspace, \t3lib_div::_POST('_swap'), $this->uid);
                                // Execute the commands:
-                               $tce = \t3lib_div::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
+                               $tce = \t3lib_div::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
                                $tce->stripslashes_values = 0;
                                $tce->start(array(), $cmd);
                                $tce->process_cmdmap();
index b965146..f53bdf6 100644 (file)
@@ -174,8 +174,8 @@ class WorkspaceModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                                                }
                                        }
                                }
-                               /** @var $tce \TYPO3\CMS\Core\DataHandler\DataHandler */
-                               $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
+                               /** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
+                               $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
                                $tce->stripslashes_values = 0;
                                $tce->start(array(), $cmdArray);
                                $tce->process_cmdmap();
index 1460699..bd6d454 100644 (file)
@@ -50,7 +50,7 @@ class CommandMap {
        protected $parent;
 
        /**
-        * @var \TYPO3\CMS\Core\DataHandler\DataHandler
+        * @var \TYPO3\CMS\Core\DataHandling\DataHandler
         */
        protected $tceMain;
 
@@ -82,10 +82,10 @@ class CommandMap {
        /**
         * Creates this object.
         *
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $parent
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $parent
         * @param array $commandMap
         */
-       public function __construct(\TYPO3\CMS\Version\Hook\DataHandlerHook $parent, \TYPO3\CMS\Core\DataHandler\DataHandler $tceMain, array $commandMap) {
+       public function __construct(\TYPO3\CMS\Version\Hook\DataHandlerHook $parent, \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain, array $commandMap) {
                $this->setParent($parent);
                $this->setTceMain($tceMain);
                $this->set($commandMap);
@@ -138,7 +138,7 @@ class CommandMap {
        /**
         * Gets the parent object.
         *
-        * @return \TYPO3\CMS\Core\DataHandler\DataHandler
+        * @return \TYPO3\CMS\Core\DataHandling\DataHandler
         */
        public function getTceMain() {
                return $this->tceMain;
@@ -147,10 +147,10 @@ class CommandMap {
        /**
         * Sets the parent object.
         *
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tceMain
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain
         * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
-       public function setTceMain(\TYPO3\CMS\Core\DataHandler\DataHandler $tceMain) {
+       public function setTceMain(\TYPO3\CMS\Core\DataHandling\DataHandler $tceMain) {
                $this->tceMain = $tceMain;
                return $this;
        }
index 5d8f1f3..d29162e 100644 (file)
@@ -63,10 +63,10 @@ class DataHandlerHook {
        /**
         * hook that is called before any cmd of the commandmap is executed
         *
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj reference to the main tcemain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj reference to the main tcemain object
         * @return void
         */
-       public function processCmdmap_beforeStart(\TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       public function processCmdmap_beforeStart(\TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                // Reset notification array
                $this->notificationEmailInfo = array();
                // Resolve dependencies of version/workspaces actions:
@@ -81,10 +81,10 @@ class DataHandlerHook {
         * @param integer $id the ID of the record
         * @param mixed $value the value containing the data
         * @param boolean $commandIsProcessed can be set so that other hooks or
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj reference to the main tcemain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj reference to the main tcemain object
         * @return      void
         */
-       public function processCmdmap($command, $table, $id, $value, &$commandIsProcessed, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       public function processCmdmap($command, $table, $id, $value, &$commandIsProcessed, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                // custom command "version"
                if ($command == 'version') {
                        $commandIsProcessed = TRUE;
@@ -134,9 +134,9 @@ class DataHandlerHook {
         * @param string $table
         * @param int $id
         * @param mixed $value
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemain
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemain
         */
-       public function processCmdmap_postProcess($command, $table, $id, $value, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemain) {
+       public function processCmdmap_postProcess($command, $table, $id, $value, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemain) {
                if ($command === 'move') {
                        if ($value < 0) {
                                $movePlaceHolder = \TYPO3\CMS\Backend\Utility\BackendUtility::getMovePlaceholder($table, abs($value), 'uid');
@@ -152,10 +152,10 @@ class DataHandlerHook {
         * hook that is called AFTER all commands of the commandmap was
         * executed
         *
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj reference to the main tcemain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj reference to the main tcemain object
         * @return      void
         */
-       public function processCmdmap_afterFinish(\TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       public function processCmdmap_afterFinish(\TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                // Empty accumulation array:
                foreach ($this->notificationEmailInfo as $notifItem) {
                        $this->notifyStageChange($notifItem['shared'][0], $notifItem['shared'][1], implode(', ', $notifItem['elements']), 0, $notifItem['shared'][2], $tcemainObj, $notifItem['alternativeRecipients']);
@@ -174,10 +174,10 @@ class DataHandlerHook {
         * @param integer $id the ID of the record
         * @param array $record The accordant database record
         * @param boolean $recordWasDeleted can be set so that other hooks or
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj reference to the main tcemain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj reference to the main tcemain object
         * @return      void
         */
-       public function processCmdmap_deleteAction($table, $id, array $record, &$recordWasDeleted, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       public function processCmdmap_deleteAction($table, $id, array $record, &$recordWasDeleted, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                // only process the hook if it wasn't processed
                // by someone else before
                if (!$recordWasDeleted) {
@@ -264,7 +264,7 @@ class DataHandlerHook {
         * @param boolean $recordWasMoved can be set so that other hooks or
         * @param       $table  the table
         */
-       public function moveRecord($table, $uid, $destPid, array $propArr, array $moveRec, $resolvedPid, &$recordWasMoved, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       public function moveRecord($table, $uid, $destPid, array $propArr, array $moveRec, $resolvedPid, &$recordWasMoved, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                // Only do something in Draft workspace
                if ($tcemainObj->BE_USER->workspace !== 0) {
                        $recordWasMoved = TRUE;
@@ -326,11 +326,11 @@ class DataHandlerHook {
         * @param string $table Table name of element (or list of element names if $id is zero)
         * @param integer $id Record uid of element (if zero, then $table is used as reference to element(s) alone)
         * @param string $comment User comment sent along with action
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj TCEmain object
         * @param array $notificationAlternativeRecipients List of recipients to notify instead of be_users selected by sys_workspace, list is generated by workspace extension module
         * @return void
         */
-       protected function notifyStageChange(array $stat, $stageId, $table, $id, $comment, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj, array $notificationAlternativeRecipients = array()) {
+       protected function notifyStageChange(array $stat, $stageId, $table, $id, $comment, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj, array $notificationAlternativeRecipients = array()) {
                $workspaceRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_workspace', $stat['uid']);
                // So, if $id is not set, then $table is taken to be the complete element name!
                $elementName = $id ? $table . ':' . $id : $table;
@@ -556,11 +556,11 @@ class DataHandlerHook {
         * @param integer $stageId Stage ID to set
         * @param string $comment Comment that goes into log
         * @param boolean $notificationEmailInfo Accumulate state changes in memory for compiled notification email?
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj TCEmain object
         * @param array $notificationAlternativeRecipients comma separated list of recipients to notify instead of normal be_users
         * @return void
         */
-       protected function version_setStage($table, $id, $stageId, $comment = '', $notificationEmailInfo = FALSE, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj, array $notificationAlternativeRecipients = array()) {
+       protected function version_setStage($table, $id, $stageId, $comment = '', $notificationEmailInfo = FALSE, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj, array $notificationAlternativeRecipients = array()) {
                if ($errorCode = $tcemainObj->BE_USER->workspaceCannotEditOfflineVersion($table, $id)) {
                        $tcemainObj->newlog('Attempt to set stage for record failed: ' . $errorCode, 1);
                } elseif ($tcemainObj->checkRecordUpdateAccess($table, $id)) {
@@ -602,11 +602,11 @@ class DataHandlerHook {
         * @param integer $uid Page uid to create new version of.
         * @param string $label Version label
         * @param integer $versionizeTree Indicating "treeLevel" - "page" (0) or "branch" (>=1) ["element" type must call versionizeRecord() directly]
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj TCEmain object
         * @return void
         * @see copyPages()
         */
-       protected function versionizePages($uid, $label, $versionizeTree, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       protected function versionizePages($uid, $label, $versionizeTree, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                $uid = intval($uid);
                // returns the branch
                $brExist = $tcemainObj->doesBranchExist('', $uid, $tcemainObj->pMap['show'], 1);
@@ -663,10 +663,10 @@ class DataHandlerHook {
         * @param integer $id UID of the online record to swap
         * @param integer $swapWith UID of the archived version to swap with!
         * @param boolean $swapIntoWS If set, swaps online into workspace instead of publishing out of workspace.
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj TCEmain object
         * @return void
         */
-       protected function version_swap($table, $id, $swapWith, $swapIntoWS = 0, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       protected function version_swap($table, $id, $swapWith, $swapIntoWS = 0, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                // First, check if we may actually edit the online record
                if ($tcemainObj->checkRecordUpdateAccess($table, $id)) {
                        // Select the two versions:
@@ -880,10 +880,10 @@ class DataHandlerHook {
         * @param array $conf: TCA configuration of current field
         * @param array $curVersion: Reference to the current (original) record
         * @param array $swapVersion: Reference to the record (workspace/versionized) to publish in or swap with
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj TCEmain object
         * @return void
         */
-       protected function version_swap_procBasedOnFieldType($table, $field, array $conf, array &$curVersion, array &$swapVersion, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       protected function version_swap_procBasedOnFieldType($table, $field, array $conf, array &$curVersion, array &$swapVersion, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                $inlineType = $tcemainObj->getInlineFieldType($conf);
                // Process pointer fields on normalized database:
                if ($inlineType == 'field') {
@@ -940,10 +940,10 @@ class DataHandlerHook {
         * @param string $table Table name
         * @param integer $id Record UID
         * @param boolean $flush If set, will completely delete element
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj TCEmain object
         * @return      void
         */
-       protected function version_clearWSID($table, $id, $flush = FALSE, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       protected function version_clearWSID($table, $id, $flush = FALSE, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                if ($errorCode = $tcemainObj->BE_USER->workspaceCannotEditOfflineVersion($table, $id)) {
                        $tcemainObj->newlog('Attempt to reset workspace for record failed: ' . $errorCode, 1);
                } elseif ($tcemainObj->checkRecordUpdateAccess($table, $id)) {
@@ -988,11 +988,11 @@ class DataHandlerHook {
         * @param integer $oldPageId Current page id.
         * @param integer $newPageId New page id
         * @param array $copyTablesArray Array of tables from which to copy
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj TCEmain object
         * @return void
         * @see versionizePages()
         */
-       protected function rawCopyPageContent($oldPageId, $newPageId, array $copyTablesArray, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       protected function rawCopyPageContent($oldPageId, $newPageId, array $copyTablesArray, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                if ($newPageId) {
                        foreach ($copyTablesArray as $table) {
                                // all records under the page is copied.
@@ -1136,11 +1136,11 @@ class DataHandlerHook {
         * @param integer $uid Record uid to move (online record)
         * @param integer $destPid Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
         * @param integer $wsUid UID of offline version of online record
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj TCEmain object
         * @return void
         * @see moveRecord()
         */
-       protected function moveRecord_wsPlaceholders($table, $uid, $destPid, $wsUid, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
+       protected function moveRecord_wsPlaceholders($table, $uid, $destPid, $wsUid, \TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj) {
                // If a record gets moved after a record that already has a placeholder record
                // then the new placeholder record needs to be after the existing one
                $originalRecordDestinationPid = $destPid;
@@ -1233,11 +1233,11 @@ class DataHandlerHook {
        /**
         * Gets an instance of the command map helper.
         *
-        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tceMain TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain TCEmain object
         * @param array $commandMap The command map as submitted to t3lib_TCEmain
         * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
-       public function getCommandMap(\TYPO3\CMS\Core\DataHandler\DataHandler $tceMain, array $commandMap) {
+       public function getCommandMap(\TYPO3\CMS\Core\DataHandling\DataHandler $tceMain, array $commandMap) {
                return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\DataHandler\\CommandMap', $this, $tceMain, $commandMap);
        }
 
index 214995f..3a16649 100644 (file)
@@ -135,7 +135,7 @@ class WorkspacesUtility {
                        $cmd = $this->getCmdArrayForPublishWS($rec['uid'], $rec['swap_modes'] == 1);
                        // $rec['swap_modes']==1 means that auto-publishing will swap versions, not just publish and empty the workspace.
                        // Execute CMD array:
-                       $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
+                       $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
                        $tce->stripslashes_values = 0;
                        $tce->start(array(), $cmd);
                        $tce->process_cmdmap();