[BUGFIX] Move forgotten getEnvironmentMode() 60/23760/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 11 Sep 2013 16:47:30 +0000 (18:47 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Wed, 11 Sep 2013 17:00:11 +0000 (19:00 +0200)
getWhereClauseForEnabledFields() moved from StorageRepository
to AbstractRepository, but getEnvironmentMode() stayed
in StorageRepository although getWhereClauseForEnabledFields()
relies on it. Move getEnvironmentMode() as well.

Change-Id: Id252c8bd3b9e09a2c38d5ea1ebe6497dd76c12ae
Resolves: #51562
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/23760
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Resource/AbstractRepository.php
typo3/sysext/core/Classes/Resource/StorageRepository.php

index b5e6cd8..68a1260 100644 (file)
@@ -290,6 +290,16 @@ abstract class AbstractRepository implements \TYPO3\CMS\Extbase\Persistence\Repo
                return $this->objectType;
        }
 
+       /**
+        * Function to return the current TYPO3_MODE.
+        * This function can be mocked in unit tests to be able to test frontend behaviour.
+        *
+        * @return string
+        */
+       protected function getEnvironmentMode() {
+               return TYPO3_MODE;
+       }
+
 }
 
 
index 055558e..11bfb5c 100644 (file)
@@ -199,15 +199,6 @@ class StorageRepository extends AbstractRepository {
                return $this->factory->getStorageObject($databaseRow['uid'], $databaseRow);
        }
 
-       /**
-        * Function to return the current TYPO3_MODE.
-        * This function can be mocked in unit tests to be able to test frontend behaviour.
-        *
-        * @return string
-        */
-       protected function getEnvironmentMode() {
-               return TYPO3_MODE;
-       }
 }