[TASK] Streamline PageRepository->getRawRecord 20/52620/4
authorBenni Mack <benni@typo3.org>
Wed, 26 Apr 2017 19:05:48 +0000 (21:05 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Fri, 28 Apr 2017 05:31:58 +0000 (07:31 +0200)
The fourth parameter of `PageRepository->getRawRecord()` is not
properly used nor useful for public cases and should be handled
differently in the future.

However, this patch basically just streamlines the callers' code.

Resolves: #81026
Releases: master
Change-Id: I52f0f82e5f36bfa0b3750d90685a3961d1828388
Reviewed-on: https://review.typo3.org/52620
Reviewed-by: Sascha Egerer <sascha@sascha-egerer.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index a35fdd6..102d2e3 100644 (file)
@@ -180,12 +180,7 @@ class FilesContentObject extends AbstractContentObject
         $pageRepository = $this->getPageRepository();
         // Fetch element if definition has been modified via TypoScript
         if ($referencesForeignTable !== $tableName || $referencesForeignUid !== $currentId) {
-            $element = $pageRepository->getRawRecord(
-                $referencesForeignTable,
-                $referencesForeignUid,
-                '*',
-                false
-            );
+            $element = $pageRepository->getRawRecord($referencesForeignTable, $referencesForeignUid);
 
             $pageRepository->versionOL($referencesForeignTable, $element, true);
             if ($referencesForeignTable === 'pages') {
index c56ba6a..d7ab355 100644 (file)
@@ -2576,7 +2576,7 @@ class TypoScriptFrontendController
             // using sys_language_content because the ISO code only (currently) affect content selection from FlexForms - which should follow "sys_language_content"
             // Set the fourth parameter to TRUE in the next two getRawRecord() calls to
             // avoid versioning overlay to be applied as it generates an SQL error
-            $sys_language_row = $this->sys_page->getRawRecord('sys_language', $this->sys_language_content, 'language_isocode,static_lang_isocode', true);
+            $sys_language_row = $this->sys_page->getRawRecord('sys_language', $this->sys_language_content, 'language_isocode,static_lang_isocode');
             if (is_array($sys_language_row) && !empty($sys_language_row['language_isocode'])) {
                 $this->sys_language_isocode = $sys_language_row['language_isocode'];
             }