Added feature #11148: Remove static require_once() to t3lib and tslib and use autoloa...
authorOliver Hader <oliver.hader@typo3.org>
Fri, 22 May 2009 19:08:30 +0000 (19:08 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 22 May 2009 19:08:30 +0000 (19:08 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5482 709f56b5-9817-0410-a4d7-c38de5d9e867

33 files changed:
ChangeLog
t3lib/class.t3lib_basicfilefunc.php
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_browsetree.php
t3lib/class.t3lib_cache.php
t3lib/class.t3lib_extmgm.php
t3lib/class.t3lib_extobjbase.php
t3lib/class.t3lib_foldertree.php
t3lib/class.t3lib_frontendedit.php
t3lib/class.t3lib_install.php
t3lib/class.t3lib_loaddbgroup.php
t3lib/class.t3lib_lock.php
t3lib/class.t3lib_pagetree.php
t3lib/class.t3lib_parsehtml_proc.php
t3lib/class.t3lib_refindex.php
t3lib/class.t3lib_softrefproc.php
t3lib/class.t3lib_sqlengine.php
t3lib/class.t3lib_svbase.php
t3lib/class.t3lib_syntaxhl.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tceforms_fe.php
t3lib/class.t3lib_tceforms_inline.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_transferdata.php
t3lib/class.t3lib_treeview.php
t3lib/class.t3lib_tsparser_ext.php
t3lib/class.t3lib_tsstyleconfig.php
t3lib/class.t3lib_tstemplate.php
t3lib/class.t3lib_userauthgroup.php
typo3/init.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/cms/tslib/index_ts.php

index 32310c1..a1aae13 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
        * Follow-up to feature #10455: Enable system extension recycler by default
        * Fixed bug #10597: Admin panel is not available anymore when extension fe_edit is not installed
        * Reverted bug #11087 from rev 5441: Selecting more than one item in a selector box is not possible anymore
+       * Added feature #11148: Remove static require_once() to t3lib and tslib and use autoloading instead
 
 2009-05-22  Rupert Germann  <rupi@gmx.li>
 
index 94e51a9..c627ddd 100644 (file)
@@ -67,7 +67,6 @@
  *
  */
 
-require_once(PATH_t3lib.'class.t3lib_cs.php');
 
 
 /**
index 5694b00..1b6c01b 100644 (file)
  *
  */
 
-require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
 
 
 /**
index 7ccba56..62b74ea 100644 (file)
@@ -49,7 +49,6 @@
  *
  */
 
-require_once (PATH_t3lib.'class.t3lib_treeview.php');
 
 
 
index a9d2af5..0547b90 100644 (file)
@@ -22,7 +22,6 @@
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 
-require_once(PATH_t3lib . 'interfaces/interface.t3lib_singleton.php');
 
 /**
  * A cache handling helper class
index 823462c..5e49943 100644 (file)
@@ -855,8 +855,6 @@ final class t3lib_extMgm {
 
                                                // service depends on external programs - check if they exists
                                        if(trim($info['exec'])) {
-                                               require_once(PATH_t3lib.'class.t3lib_exec.php');
-
                                                $executables = t3lib_div::trimExplode(',', $info['exec'], 1);
                                                foreach($executables as $executable) {
                                                        if(!t3lib_exec::checkCommand($executable)) {
index d990f66..3c27d9a 100644 (file)
  *
  * Anyways, the final interesting thing is to see what the framework "func_wizard" actually does:
  *
- *     require_once(PATH_t3lib."class.t3lib_extobjbase.php");
  *     class tx_funcwizards_webfunc extends t3lib_extobjbase {
  *             var $localLangFile = "locallang.php";
  *             var $function_key = "wiz";
index a041ce0..a09fc92 100644 (file)
@@ -55,7 +55,6 @@
  *
  */
 
-require_once (PATH_t3lib.'class.t3lib_treeview.php');
 
 
 
index a84ed3b..9acc7d4 100644 (file)
@@ -66,16 +66,8 @@ class t3lib_frontendedit {
                if ($GLOBALS['BE_USER']->isFrontendEditingActive()) {
                        $GLOBALS['TSFE']->includeTCA();
                        if ($this->isEditAction()) {
-                               require_once (PATH_t3lib . 'class.t3lib_tcemain.php');
                                $this->editAction();
                        }
-
-                       if ($this->isEditFormShown()) {
-                               require_once(PATH_t3lib . 'class.t3lib_tceforms.php');
-                               require_once(PATH_t3lib . 'class.t3lib_iconworks.php');
-                               require_once(PATH_t3lib . 'class.t3lib_loaddbgroup.php');
-                               require_once(PATH_t3lib . 'class.t3lib_transferdata.php');
-                       }
                }
        }
 
index 685cefb..c69e2ef 100644 (file)
@@ -71,7 +71,6 @@
 
 
 
-require_once(PATH_t3lib.'class.t3lib_sqlparser.php');
 
 /**
  * Class to setup values in localconf.php and verify the TYPO3 DB tables/fields
index 626888a..1ed2245 100644 (file)
@@ -62,7 +62,6 @@
 
 
 
-require_once (PATH_t3lib.'class.t3lib_refindex.php');
 
 
 
index e169242..13ada60 100644 (file)
@@ -32,7 +32,6 @@
  * @author     Michael Stucki <michael@typo3.org>
  */
 
-require_once(PATH_t3lib.'class.t3lib_div.php');
 
 
 
index bdeb6a5..739c835 100644 (file)
@@ -64,7 +64,6 @@
 
 
 
-require_once (PATH_t3lib.'class.t3lib_treeview.php');
 
 /**
  * Class for generating a page tree.
index bdd6a8b..1983232 100644 (file)
@@ -80,7 +80,6 @@
  *
  */
 
-require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
 
 
 
index 44361a6..e179979 100644 (file)
  *
  */
 
-require_once(PATH_t3lib.'class.t3lib_befunc.php');
-require_once(PATH_t3lib.'class.t3lib_tcemain.php');
-require_once(PATH_t3lib.'class.t3lib_flexformtools.php');
-//require_once(PATH_typo3.'sysext/indexed_search/class.lexer.php'); // Disabled until Kasper finishes this feature. Apart from that, t3lib classes should never require stuff from extensions.
 
 
 
index 3aa2530..986ef01 100644 (file)
@@ -94,7 +94,6 @@
  */
 
 
-require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
 
 /**
  * Class for processing of the default soft reference types for CMS:
index a3ca90e..a1fb55c 100644 (file)
@@ -89,7 +89,6 @@
 
 
 
-require_once(PATH_t3lib.'class.t3lib_sqlparser.php');
 
 
 /**
index 8469603..ae49bae 100644 (file)
@@ -108,7 +108,6 @@ define ('T3_ERR_SV_PROG_FAILED', -41); // passed subtype is not possible with th
 // define ('T3_ERR_SV_serviceType_myerr, -100); // All errors with prefix T3_ERR_SV_[serviceType]_ and lower than -99 are service type dependent error
 
 
-require_once(PATH_t3lib.'class.t3lib_exec.php');
 
 
 
@@ -375,8 +374,6 @@ abstract class t3lib_svbase {
        function checkExec($progList) {
                $ret = TRUE;
 
-               require_once(PATH_t3lib.'class.t3lib_exec.php');
-
                $progList = t3lib_div::trimExplode(',', $progList, 1);
                foreach($progList as $prog) {
                        if (!t3lib_exec::checkCommand($prog)) {
index befb24b..1206334 100644 (file)
@@ -71,7 +71,6 @@
 
 
 
-require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
 
 
 /**
index 5778a44..3decb10 100644 (file)
 
 
 
-require_once(PATH_t3lib.'class.t3lib_diff.php');
-require_once(PATH_t3lib.'class.t3lib_tceforms_inline.php');
-
-       /**
-        * Frontend version of TCEForms has been moved into its own file and should
-        * be included directly by calling scripts.
-        */
-require_once(PATH_t3lib . 'class.t3lib_tceforms_fe.php');
 
 
 /**
index c08f0a5..a8b64b4 100644 (file)
@@ -49,7 +49,6 @@
  * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
  */
 
-require_once(PATH_t3lib . 'class.t3lib_tceforms.php');
 
 
 /**
index 3ad3f32..6c0c099 100644 (file)
@@ -88,7 +88,6 @@
  *
  */
 
-require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
 
 class t3lib_TCEforms_inline {
 
@@ -998,8 +997,6 @@ class t3lib_TCEforms_inline {
                global $SOBE, $BE_USER, $TYPO3_CONF_VARS;
 
                require_once(PATH_typo3.'template.php');
-               require_once(PATH_t3lib.'class.t3lib_tceforms.php');
-               require_once(PATH_t3lib.'class.t3lib_clipboard.php');
 
                $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_alt_doc.xml');
 
index 8c5b2a8..87f73e3 100644 (file)
 
 
 
-// *******************************
-// Including necessary libraries
-// *******************************
-require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
-require_once (PATH_t3lib.'class.t3lib_parsehtml_proc.php');
-require_once (PATH_t3lib.'class.t3lib_stdgraphic.php');
-require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
-require_once (PATH_t3lib.'class.t3lib_refindex.php');
-require_once (PATH_t3lib.'class.t3lib_flexformtools.php');
 
 
 
index 8f2d714..17bcfff 100644 (file)
  */
 
 
-require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
-require_once (PATH_t3lib.'class.t3lib_loadmodules.php');
-require_once (PATH_t3lib.'class.t3lib_parsehtml_proc.php');
-require_once (PATH_t3lib.'class.t3lib_flexformtools.php');
 
 
 
index ce5d026..8b6090a 100644 (file)
@@ -98,9 +98,6 @@
 
 
 
-require_once (PATH_t3lib.'class.t3lib_iconworks.php');
-require_once (PATH_t3lib.'class.t3lib_befunc.php');
-require_once (PATH_t3lib.'class.t3lib_div.php');
 
 
 /**
index c27a22c..f524395 100644 (file)
@@ -87,7 +87,6 @@
  *
  */
 
-require_once(PATH_t3lib.'class.t3lib_tstemplate.php');
 
 
 
index 52b4d10..32b9519 100644 (file)
@@ -57,7 +57,6 @@
  *
  */
 
-require_once(PATH_t3lib.'class.t3lib_tsparser_ext.php');
 
 
 
index 2c40d6c..9e841f3 100644 (file)
@@ -80,8 +80,6 @@
  *
  */
 
-require_once (PATH_t3lib.'class.t3lib_tsparser.php');
-require_once (PATH_t3lib.'class.t3lib_matchcondition.php');
 
 
 
index e6a0b57..126aad3 100644 (file)
@@ -99,8 +99,6 @@
  *
  */
 
-       // Need this for parsing User TSconfig
-require_once (PATH_t3lib.'class.t3lib_tsparser.php');
 
 
 
index aefb941..c49d9b5 100644 (file)
@@ -195,26 +195,6 @@ $PARSETIME_START = t3lib_div::milliseconds();              // Is set to the system time in m
 // Initializing the Caching System
 // ***********************************
 
-       // TODO implement autoloading so that we only require stuff we really need
-require_once(PATH_t3lib . 'class.t3lib_cache.php');
-
-require_once(PATH_t3lib . 'cache/backend/interfaces/interface.t3lib_cache_backend_backend.php');
-require_once(PATH_t3lib . 'cache/frontend/interfaces/interface.t3lib_cache_frontend_frontend.php');
-
-require_once(PATH_t3lib . 'cache/backend/class.t3lib_cache_backend_abstractbackend.php');
-require_once(PATH_t3lib . 'cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php');
-require_once(PATH_t3lib . 'cache/class.t3lib_cache_exception.php');
-require_once(PATH_t3lib . 'cache/class.t3lib_cache_factory.php');
-require_once(PATH_t3lib . 'cache/class.t3lib_cache_manager.php');
-require_once(PATH_t3lib . 'cache/frontend/class.t3lib_cache_frontend_variablefrontend.php');
-
-require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_classalreadyloaded.php');
-require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_duplicateidentifier.php');
-require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_invalidbackend.php');
-require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_invalidcache.php');
-require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_invaliddata.php');
-require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_nosuchcache.php');
-
 $typo3CacheManager = t3lib_div::makeInstance('t3lib_cache_Manager');
 $typo3CacheFactory = t3lib_div::makeInstance('t3lib_cache_Factory');
 $typo3CacheFactory->setCacheManager($typo3CacheManager);
@@ -253,17 +233,6 @@ if (defined('TYPO3_cliMode') && TYPO3_cliMode && basename(PATH_thisScript)=='cli
 }
 
 
-
-// *********************
-// Libraries included
-// *********************
-require_once(PATH_t3lib.'class.t3lib_userauth.php');
-require_once(PATH_t3lib.'class.t3lib_userauthgroup.php');
-require_once(PATH_t3lib.'class.t3lib_beuserauth.php');
-require_once(PATH_t3lib.'class.t3lib_iconworks.php');
-require_once(PATH_t3lib.'class.t3lib_befunc.php');
-require_once(PATH_t3lib.'class.t3lib_cs.php');
-
 // **********************
 // Check Hardcoded lock on BE:
 // **********************
index 0a88798..c8c6d24 100644 (file)
@@ -591,44 +591,11 @@ require_once (PATH_t3lib.'class.t3lib_lock.php');
         ********************************************/
 
        /**
-        * Include files necessary for the TYPO3 caching framework. This method will
-        * go away when autoloading is implemented.
-        *
-        * @return      void
-        */
-       protected function includeCaches() {
-               $GLOBALS['TT']->push('Including the Caching System','');
-
-               t3lib_div::requireOnce(PATH_t3lib . 'class.t3lib_cache.php');
-
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/backend/interfaces/interface.t3lib_cache_backend_backend.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/frontend/interfaces/interface.t3lib_cache_frontend_frontend.php');
-
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/backend/class.t3lib_cache_backend_abstractbackend.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/class.t3lib_cache_exception.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/class.t3lib_cache_factory.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/class.t3lib_cache_manager.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/frontend/class.t3lib_cache_frontend_variablefrontend.php');
-
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_classalreadyloaded.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_duplicateidentifier.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_invalidbackend.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_invalidcache.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_invaliddata.php');
-               t3lib_div::requireOnce(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_nosuchcache.php');
-
-               $GLOBALS['TT']->pull();
-       }
-
-       /**
         * Initializes the caching system.
         *
         * @return      void
         */
        protected function initCaches() {
-               $this->includeCaches();
-
                $GLOBALS['TT']->push('Initializing the Caching System','');
 
                $GLOBALS['typo3CacheManager'] = t3lib_div::makeInstance('t3lib_cache_Manager');
index b8b609f..074f0fc 100644 (file)
@@ -972,18 +972,6 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/class
 
 
 
-// ********************************************************
-// Includes the search-class if $sword and $scols are set.
-// ********************************************************
-if (t3lib_div::_GP('sword') && t3lib_div::_GP('scols'))        {
-       require_once(PATH_tslib.'class.tslib_search.php');
-}
-
-// ************
-// LoadDBGroup
-// ************
-require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
-
 /**
  * Class for fetching record relations for the frontend.
  *
@@ -996,20 +984,4 @@ class FE_loadDBGroup extends t3lib_loadDBGroup {
        var $fromTC = 0;        // Means that everything is returned instead of only uid and label-field
 }
 
-// **********************************
-// includes stuff for graphical work
-// **********************************
-require_once(PATH_t3lib.'class.t3lib_stdgraphic.php');
-require_once(PATH_tslib.'class.tslib_gifbuilder.php');
-
-// *************************
-// includes menu-management
-// *************************
-require_once(PATH_tslib.'class.tslib_menu.php');
-
-// *************************
-// Global content object...
-// *************************
-require_once(PATH_tslib.'class.tslib_content.php');
-
 ?>
\ No newline at end of file
index 11a5c32..ea30b52 100644 (file)
@@ -161,23 +161,11 @@ if ($temp_extId = t3lib_div::_GP('eID'))  {
                // Remove any output produced until now
                ob_clean();
 
-               require_once(PATH_tslib.'class.tslib_eidtools.php');
                require($classPath);
        }
        exit;
 }
 
-// *********************
-// Libraries included
-// *********************
-$TT->push('Include Frontend libraries','');
-       require_once(PATH_tslib.'class.tslib_fe.php');
-       require_once(PATH_t3lib.'class.t3lib_page.php');
-       require_once(PATH_t3lib.'class.t3lib_userauth.php');
-       require_once(PATH_tslib.'class.tslib_feuserauth.php');
-       require_once(PATH_t3lib.'class.t3lib_tstemplate.php');
-       require_once(PATH_t3lib.'class.t3lib_cs.php');
-$TT->pull();
 
 // ***********************************
 // Create $TSFE object (TSFE = TypoScript Front End)
@@ -231,7 +219,6 @@ if ($TYPO3_CONF_VARS['FE']['compressionLevel'] && extension_loaded('zlib')) {
                // Prevent errors if ini_set() is unavailable (safe mode)
                @ini_set('zlib.output_compression_level', $TYPO3_CONF_VARS['FE']['compressionLevel']);
        }
-       require_once(PATH_tslib . 'class.tslib_fecompression.php');
        ob_start(array(t3lib_div::makeInstance('tslib_fecompression'), 'compressionOutputHandler'));
 }
 
@@ -406,12 +393,9 @@ $TSFE->checkJumpUrlReferer();
 // *******************************
 switch($TSFE->checkDataSubmission())   {
        case 'email':
-               require_once(PATH_t3lib.'class.t3lib_htmlmail.php');
-               require_once(PATH_t3lib.'class.t3lib_formmail.php');
                $TSFE->sendFormmail();
        break;
        case 'fe_tce':
-               require_once(PATH_tslib.'class.tslib_fetce.php');
                $TSFE->includeTCA();
                $TT->push('fe_tce','');
                $TSFE->fe_tce();
@@ -426,9 +410,6 @@ switch($TSFE->checkDataSubmission())        {
 $TSFE->setUrlIdToken();
 
 $TT->push('Page generation','');
-       if ($TSFE->doXHTML_cleaning()) {
-               require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
-       }
        if ($TSFE->isGeneratePage()) {
                $TSFE->generatePage_preProcessing();
                $temp_theScript=$TSFE->generatePage_whichScript();
@@ -436,12 +417,10 @@ $TT->push('Page generation','');
                if ($temp_theScript) {
                        include($temp_theScript);
                } else {
-                       require_once(PATH_tslib.'class.tslib_pagegen.php');
                        include(PATH_tslib.'pagegen.php');
                }
                $TSFE->generatePage_postProcessing();
        } elseif ($TSFE->isINTincScript()) {
-               require_once(PATH_tslib.'class.tslib_pagegen.php');
                include(PATH_tslib.'pagegen.php');
        }
 $TT->pull();