[BUGFIX] Respect _FILE/_STRING in versioning
[Packages/TYPO3.CMS.git] / typo3 / sysext / version / Classes / Dependency / ElementEntity.php
index 4056f3e..5d09f02 100644 (file)
@@ -213,16 +213,24 @@ class ElementEntity {
                        $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', $where, '', 'sorting');
                        if (is_array($rows)) {
                                foreach ($rows as $row) {
-                                       $arguments = array('table' => $row['ref_table'], 'id' => $row['ref_uid'], 'field' => $row['field'], 'scope' => self::REFERENCES_ChildOf);
-                                       $callbackResponse = $this->dependency->executeEventCallback(self::EVENT_CreateChildReference, $this, $arguments);
-                                       if ($callbackResponse !== self::RESPONSE_Skip) {
-                                               $this->children[] = $this->getDependency()->getFactory()->getReferencedElement(
-                                                       $row['ref_table'],
-                                                       $row['ref_uid'],
-                                                       $row['field'],
-                                                       array(),
-                                                       $this->getDependency()
+                                       if ($row['ref_table'] !== '_FILE' && $row['ref_table'] !== '_STRING') {
+                                               $arguments = array(
+                                                       'table' => $row['ref_table'],
+                                                       'id' => $row['ref_uid'],
+                                                       'field' => $row['field'],
+                                                       'scope' => self::REFERENCES_ChildOf
                                                );
+
+                                               $callbackResponse = $this->dependency->executeEventCallback(self::EVENT_CreateChildReference, $this, $arguments);
+                                               if ($callbackResponse !== self::RESPONSE_Skip) {
+                                                       $this->children[] = $this->getDependency()->getFactory()->getReferencedElement(
+                                                               $row['ref_table'],
+                                                               $row['ref_uid'],
+                                                               $row['field'],
+                                                               array(),
+                                                               $this->getDependency()
+                                                       );
+                                               }
                                        }
                                }
                        }