[TYPO3-dev] Cleaning up t3lib-filenames
Martin Kutschker
masi-no at spam-typo3.org
Tue Sep 29 10:34:29 CEST 2009
Moving the topic to typo3.projects.typo3_4-3.general.
Maybe it gets there more attention.
Martin Kutschker schrieb:
>
> How about rename a couple of files in a backwards compatible manner in t3lib so that the class name
> leads directly to the file path?
>
> The whole procedure may not be presented as a diff as existing files are renamed (and moved) and new
> files are added in their stead.
>
> eg
> svn mv class.t3lib_page.php class.t3lib_pageselect.php
> mv class.t3lib_page-compat.php class.t3lib_page.php
> svn add class.t3lib_page.php
>
> The compatibility file (class.t3lib_page.php) contains only one line:
>
> require_once(PATH_t3lib . 'class.t3lib_pageselect.php');
>
> Because of the autoloader this isn't really necessary, but so the file is at least not empty.
>
> The file with the new name has a changed extended XCLASS section:
>
> if (defined('TYPO3_MODE')) {
> if ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pageselect.php']) {
> include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pageselect.php']);
> } elseif ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_page.php']) {
> // backwards compatibility
> include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_page.php']);
> }
> }
More information about the TYPO3-dev
mailing list