[+BUGFIX] Extbase (Persistence): remove superfluous require_once statements
authorSebastian Kurfürst <sebastian@typo3.org>
Wed, 19 Jan 2011 07:46:26 +0000 (07:46 +0000)
committerSebastian Kurfürst <sebastian@typo3.org>
Wed, 19 Jan 2011 07:46:26 +0000 (07:46 +0000)
There are some require_once of classes that already are covered by the
Core autoloaded. This is unnecessary and also a negatively affects
performance (because require_once is rather slow). That's why these
require_once statements are dropped.

Thanks to Oliver Klee for the patch!

Resolves: #12324

typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php
typo3/sysext/extbase/Tests/Unit/Persistence/Mapper/DataMapFactoryTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/SessionTest.php

index a306b34..76ed655 100644 (file)
@@ -928,11 +928,9 @@ class Tx_Extbase_Persistence_Storage_Typo3DbBackend implements Tx_Extbase_Persis
                                        if (is_object($GLOBALS['TSFE'])) {
                                                $this->pageSelectObject = $GLOBALS['TSFE']->sys_page;
                                        } else {
-                                               require_once(PATH_t3lib . 'class.t3lib_page.php');
                                                $this->pageSelectObject = t3lib_div::makeInstance('t3lib_pageSelect');
                                        }
                                } else {
-                                       require_once(PATH_t3lib . 'class.t3lib_page.php');
                                        $this->pageSelectObject = t3lib_div::makeInstance( 't3lib_pageSelect' );
                                }
                        }
index 1fd2979..142f856 100644 (file)
@@ -25,8 +25,6 @@
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 
-require_once(PATH_tslib . 'class.tslib_content.php');
-
 class Tx_Extbase_Tests_Unit_Persistence_Mapper_DataMapFactoryTest extends Tx_Extbase_Tests_Unit_BaseTestCase {
 
        /**
index 7f1f423..8c5f217 100644 (file)
@@ -25,8 +25,6 @@
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 
-require_once(PATH_tslib . 'class.tslib_content.php');
-
 class Tx_Extbase_Tests_Unit_Persistence_SessionTest extends tx_phpunit_testcase {
 
        /**