[BUGFIX] Misspelling in Typo3DbBackend.php
authorNicole Cordes <n.cordes@biz-design.biz>
Mon, 5 Nov 2012 20:28:48 +0000 (21:28 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Mon, 5 Nov 2012 20:40:29 +0000 (21:40 +0100)
There is a misspelling in
Classes/Persistence/Generic/Storage/Typo3DbBackend.php and its test.
Property pageRepositiory should be renamed to pageRepository.

Change-Id: I858c49509773f94483b5d92909e63625859bc9b5
Fixes: #42683
Releases: 6.0
Reviewed-on: http://review.typo3.org/16219
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
typo3/sysext/extbase/Tests/Unit/Persistence/Storage/Typo3DbBackendTest.php

index a48dafb..c8a7132 100644 (file)
@@ -50,7 +50,7 @@ class Typo3DbBackend implements \TYPO3\CMS\Extbase\Persistence\Generic\Storage\B
         *
         * @var \TYPO3\CMS\Frontend\Page\PageRepository
         */
-       protected $pageRepositiory;
+       protected $pageRepository;
 
        /**
         * A first-level TypoScript configuration cache
@@ -1065,18 +1065,18 @@ class Typo3DbBackend implements \TYPO3\CMS\Extbase\Persistence\Generic\Storage\B
                }
                // If we do not have a table name here, we cannot do an overlay and return the original rows instead.
                if (isset($tableName)) {
-                       $pageRepositiory = $this->getPageRepository();
+                       $pageRepository = $this->getPageRepository();
                        if (is_object($GLOBALS['TSFE'])) {
                                $languageMode = $GLOBALS['TSFE']->sys_language_mode;
                                if ($workspaceUid !== NULL) {
-                                       $pageRepositiory->versioningWorkspaceId = $workspaceUid;
+                                       $pageRepository->versioningWorkspaceId = $workspaceUid;
                                }
                        } else {
                                $languageMode = '';
                                if ($workspaceUid === NULL) {
                                        $workspaceUid = $GLOBALS['BE_USER']->workspace;
                                }
-                               $pageRepositiory->versioningWorkspaceId = $workspaceUid;
+                               $pageRepository->versioningWorkspaceId = $workspaceUid;
                        }
 
                        $overlayedRows = array();
@@ -1097,18 +1097,18 @@ class Typo3DbBackend implements \TYPO3\CMS\Extbase\Persistence\Generic\Storage\B
                                                );
                                        }
                                }
-                               $pageRepositiory->versionOL($tableName, $row, TRUE);
-                               if ($pageRepositiory->versioningPreview && isset($row['_ORIG_uid'])) {
+                               $pageRepository->versionOL($tableName, $row, TRUE);
+                               if ($pageRepository->versioningPreview && isset($row['_ORIG_uid'])) {
                                        $row['uid'] = $row['_ORIG_uid'];
                                }
                                if ($tableName == 'pages') {
-                                       $row = $pageRepositiory->getPageOverlay($row, $querySettings->getSysLanguageUid());
+                                       $row = $pageRepository->getPageOverlay($row, $querySettings->getSysLanguageUid());
                                } elseif (isset($GLOBALS['TCA'][$tableName]['ctrl']['languageField'])
                                                && $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] !== ''
                                ) {
                                        if (in_array($row[$GLOBALS['TCA'][$tableName]['ctrl']['languageField']], array(-1, 0))) {
                                                $overlayMode = $languageMode === 'strict' ? 'hideNonTranslated' : '';
-                                               $row = $pageRepositiory->getRecordOverlay($tableName, $row, $querySettings->getSysLanguageUid(), $overlayMode);
+                                               $row = $pageRepository->getRecordOverlay($tableName, $row, $querySettings->getSysLanguageUid(), $overlayMode);
                                        }
                                }
                                if ($row !== NULL && is_array($row)) {
@@ -1125,15 +1125,15 @@ class Typo3DbBackend implements \TYPO3\CMS\Extbase\Persistence\Generic\Storage\B
         * @return \TYPO3\CMS\Frontend\Page\PageRepository
         */
        protected function getPageRepository() {
-               if (!$this->pageRepositiory instanceof \TYPO3\CMS\Frontend\Page\PageRepository) {
+               if (!$this->pageRepository instanceof \TYPO3\CMS\Frontend\Page\PageRepository) {
                        if ($this->getTypo3Mode() === 'FE' && is_object($GLOBALS['TSFE'])) {
-                               $this->pageRepositiory = $GLOBALS['TSFE']->sys_page;
+                               $this->pageRepository = $GLOBALS['TSFE']->sys_page;
                        } else {
-                               $this->pageRepositiory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
+                               $this->pageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
                        }
                }
 
-               return $this->pageRepositiory;
+               return $this->pageRepository;
        }
 
        /**
index eea7739..02dabc3 100644 (file)
@@ -479,7 +479,7 @@ class Typo3DbBackendTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $pageRepositoryMock->versioningPreview = TRUE;
                $pageRepositoryMock->expects($this->once())->method('getWorkspaceVersionOfRecord')->with($workspaceUid, 'tx_foo', '42')->will($this->returnValue($workspaceVersion));
                $mockTypo3DbBackend = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\Typo3DbBackend', array('dummy'), array(), '', FALSE);
-               $mockTypo3DbBackend->_set('pageRepositiory', $pageRepositoryMock);
+               $mockTypo3DbBackend->_set('pageRepository', $pageRepositoryMock);
                $this->assertSame(array($comparisonRow), $mockTypo3DbBackend->_call('doLanguageAndWorkspaceOverlay', $sourceMock, array($row), $languageUid, $workspaceUid));
        }