From a5af4659a5418582bb2789cb810ef047f956ffd1 Mon Sep 17 00:00:00 2001 From: Wouter Wolters <typo3@wouterwolters.nl> Date: Thu, 24 Nov 2016 23:55:54 +0100 Subject: [PATCH] [TASK] Fix some typos in PageRepository Remove some old comments about not loaded TCA too. Resolves: #78787 Releases: master Change-Id: Ice141123b91987957101e1193c003410e9c0282f Reviewed-on: https://review.typo3.org/50771 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Michael Oehlhof <typo3@oehlhof.de> Tested-by: Michael Oehlhof <typo3@oehlhof.de> Reviewed-by: Andreas Fernandez <typo3@scripting-base.de> Tested-by: Andreas Fernandez <typo3@scripting-base.de> --- typo3/sysext/frontend/Classes/Page/PageRepository.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/typo3/sysext/frontend/Classes/Page/PageRepository.php b/typo3/sysext/frontend/Classes/Page/PageRepository.php index 3b3bad0aaba9..8c89ce19a3ea 100644 --- a/typo3/sysext/frontend/Classes/Page/PageRepository.php +++ b/typo3/sysext/frontend/Classes/Page/PageRepository.php @@ -531,7 +531,7 @@ class PageRepository * in records from the same table) * * @param string $table Table name - * @param array $row Record to overlay. Must containt uid, pid and $table]['ctrl']['languageField'] + * @param array $row Record to overlay. Must contain uid, pid and $table]['ctrl']['languageField'] * @param int $sys_language_content Pointer to the sys_language uid for content on the site. * @param string $OLmode Overlay mode. If "hideNonTranslated" then records without translation will not be returned un-translated but unset (and return value is FALSE) * @throws \UnexpectedValueException @@ -644,7 +644,7 @@ class PageRepository /** * Returns an array with page rows for subpages of a certain page ID. This is used for menus in the frontend. - * If there are mount points in overlay mode the _MP_PARAM field is set to the corret MPvar. + * If there are mount points in overlay mode the _MP_PARAM field is set to the correct MPvar. * * If the $pageId being input does in itself require MPvars to define a correct * rootline these must be handled externally to this function. @@ -685,7 +685,7 @@ class PageRepository * Internal method used by getMenu() and getMenuForPages() * Returns an array with page rows for subpages with pid is in $pageIds or uid is in $pageIds, depending on $parentPages * This is used for menus. If there are mount points in overlay mode - * the _MP_PARAM field is set to the corret MPvar. + * the _MP_PARAM field is set to the correct MPvar. * * If the $pageIds being input does in itself require MPvars to define a correct * rootline these must be handled externally to this function. @@ -695,7 +695,7 @@ class PageRepository * @param string $sortField The field to sort by. Default is "sorting * @param string $additionalWhereClause Optional additional where clauses. Like "AND title like '%blabla%'" for instance. * @param bool $checkShortcuts Check if shortcuts exist, checks by default - * @param bool $parentPages Whether the uid list is meant as list of parent pages or the page itself TRUE means id list is checked agains pid field + * @param bool $parentPages Whether the uid list is meant as list of parent pages or the page itself TRUE means id list is checked against pid field * @return array Array with key/value pairs; keys are page-uid numbers. values are the corresponding page records (with overlayed localized fields, if any) * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::getPageShortcut(), \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::makeMenu() * @see \TYPO3\CMS\WizardCrpages\Controller\CreatePagesWizardModuleFunctionController, \TYPO3\CMS\WizardSortpages\View\SortPagesWizardModuleFunction @@ -1493,7 +1493,6 @@ class PageRepository if ($this->versioningPreview && is_array($rr) && (int)$rr['pid'] === -1 && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) { $oid = 0; $wsid = 0; - // Have to hardcode it for "pages" table since TCA is not loaded at this moment! // Check values for t3ver_oid and t3ver_wsid: if (isset($rr['t3ver_oid']) && isset($rr['t3ver_wsid'])) { // If "t3ver_oid" is already a field, just set this: @@ -1819,7 +1818,6 @@ class PageRepository $ws = $this->workspaceCache[$wsid]; } else { if ($wsid > 0) { - // No $GLOBALS['TCA'] yet! $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) ->getQueryBuilderForTable('sys_workspace'); $queryBuilder->getRestrictions()->removeAll(); -- GitLab