[BUGFIX] Fix wrong replacements of the namespace refactoring
authorHelmut Hummel <helmut.hummel@typo3.org>
Tue, 25 Sep 2012 18:55:58 +0000 (20:55 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Tue, 25 Sep 2012 21:28:15 +0000 (23:28 +0200)
If the refactoring script replaced things like "tx_foo_bar" first
and "tx_foo_bar_baz" in a second step, instances of "tx_foo_bar_baz" were
already replaced during the first run, leading to a wrong class name
like "\TYPO3\CMS\Foo\Bar_baz"

Fix the class names to get the workspace module running again.

Change-Id: Iada66e64501c17649d4cf89def44e9f3d3286f46
Resolves: #41367
Releases: 6.0
Reviewed-on: http://review.typo3.org/15062
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/version/Classes/Dependency/DependencyEntityFactory.php
typo3/sysext/version/Classes/Dependency/ElementEntity.php

index 8e64fa5..cb5c598 100644 (file)
@@ -53,7 +53,7 @@ class DependencyEntityFactory {
        public function getElement($table, $id, array $data = array(), \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency) {
                $elementName = $table . ':' . $id;
                if (!isset($this->elements[$elementName])) {
-                       $this->elements[$elementName] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element', $table, $id, $data, $dependency);
+                       $this->elements[$elementName] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\ElementEntity', $table, $id, $data, $dependency);
                }
                return $this->elements[$elementName];
        }
@@ -68,7 +68,7 @@ class DependencyEntityFactory {
        public function getReference(\TYPO3\CMS\Version\Dependency\ElementEntity $element, $field) {
                $referenceName = $element->__toString() . '.' . $field;
                if (!isset($this->references[$referenceName][$field])) {
-                       $this->references[$referenceName][$field] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Reference', $element, $field);
+                       $this->references[$referenceName][$field] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\ReferenceEntity', $element, $field);
                }
                return $this->references[$referenceName][$field];
        }
index b9b2d44..b74b368 100644 (file)
@@ -33,10 +33,10 @@ class ElementEntity {
 
        const REFERENCES_ChildOf = 'childOf';
        const REFERENCES_ParentOf = 'parentOf';
-       const EVENT_Construct = 'TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element::construct';
-       const EVENT_CreateChildReference = 'TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element::createChildReference';
-       const EVENT_CreateParentReference = 'TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element::createParentReference';
-       const RESPONSE_Skip = 'TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element->skip';
+       const EVENT_Construct = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity::construct';
+       const EVENT_CreateChildReference = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity::createChildReference';
+       const EVENT_CreateParentReference = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity::createParentReference';
+       const RESPONSE_Skip = 'TYPO3\\CMS\\Version\\Dependency\\ElementEntity->skip';
        /**
         * @var string
         */