[TASK] Use PHP5 constructors
authorStefano Kowalke <blueduck@gmx.net>
Wed, 4 May 2011 18:48:18 +0000 (20:48 +0200)
committerXavier Perseguers <typo3@perseguers.ch>
Wed, 11 May 2011 05:52:15 +0000 (07:52 +0200)
Using the new PHP5 constructors (__construct) instead of PHP4 variants.

Change-Id: Iab19b1be570cde143dacbbe244aedaf2dd8ce1a6
Resolves: #26505
Releases: 4.6
Reviewed-on: http://review.typo3.org/1797
Reviewed-by: Stefan Neufeind
Reviewed-by: Oliver Klee
Tested-by: Stefan Neufeind
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
31 files changed:
t3lib/class.t3lib_cli.php
t3lib/class.t3lib_foldertree.php
t3lib/class.t3lib_htmlmail.php
t3lib/class.t3lib_install.php
t3lib/class.t3lib_superadmin.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_xml.php
typo3/class.browse_links.php
typo3/class.filelistfoldertree.php
typo3/class.show_rechis.inc
typo3/class.webpagetree.php
typo3/sysext/beuser/mod/index.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_pibase.php
typo3/sysext/cms/tslib/interfaces/interface.tslib_menu_filterMenuPagesHook.php
typo3/sysext/impexp/app/index.php
typo3/sysext/indexed_search/class.lexer.php
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/lowlevel/class.tx_lowlevel_admin_core.php
typo3/sysext/lowlevel/class.tx_lowlevel_cleaner_core.php
typo3/sysext/lowlevel/clmods/class.cleanflexform.php
typo3/sysext/lowlevel/clmods/class.deleted.php
typo3/sysext/lowlevel/clmods/class.double_files.php
typo3/sysext/lowlevel/clmods/class.lost_files.php
typo3/sysext/lowlevel/clmods/class.missing_files.php
typo3/sysext/lowlevel/clmods/class.missing_relations.php
typo3/sysext/lowlevel/clmods/class.orphan_records.php
typo3/sysext/lowlevel/clmods/class.rte_images.php
typo3/sysext/lowlevel/clmods/class.syslog.php
typo3/sysext/lowlevel/clmods/class.versions.php
typo3/template.php

index 5f9ffea..39dc199 100644 (file)
@@ -83,7 +83,7 @@ class t3lib_cli {
         *
         * @return      void
         */
-       function t3lib_cli() {
+       function __construct() {
                        // Loads the cli_args array with command line arguments
                $this->cli_args = $this->cli_getArgIndex();
        }
index 0eaedb0..825923e 100644 (file)
@@ -71,7 +71,7 @@ class t3lib_folderTree extends t3lib_treeView {
         *
         * @return      void
         */
-       function t3lib_folderTree() {
+       function __construct() {
                parent::init();
 
                $this->MOUNTS = $GLOBALS['FILEMOUNTS'];
index 94cc790..30ec148 100644 (file)
@@ -242,7 +242,7 @@ class t3lib_htmlmail {
         *
         * @return      void
         */
-       public function t3lib_htmlmail() {
+       public function __construct() {
                t3lib_div::logDeprecatedFunction();
                $this->forceReturnPath = $GLOBALS['TYPO3_CONF_VARS']['SYS']['forceReturnPath'];
 
index e092459..efa9ac4 100644 (file)
@@ -96,7 +96,7 @@ class t3lib_install {
         *
         * @return      void
         */
-       function t3lib_install() {
+       function __construct() {
                if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['multiplyDBfieldSize'] >= 1 && $GLOBALS['TYPO3_CONF_VARS']['SYS']['multiplyDBfieldSize'] <= 5) {
                        $this->multiplySize = (double) $GLOBALS['TYPO3_CONF_VARS']['SYS']['multiplyDBfieldSize'];
                }
index b90807a..2a1ceda 100644 (file)
@@ -166,7 +166,7 @@ class t3lib_superadmin {
         *
         * @return      void
         */
-       function t3lib_superadmin() {
+       function __construct() {
                $this->show = t3lib_div::_GP('show');
                $this->type = t3lib_div::_GP('type');
                $this->exp = t3lib_div::_GP('exp');
index ba7ce32..b6a7fef 100644 (file)
@@ -303,7 +303,7 @@ class t3lib_TCEforms {
         *
         * @return      void
         */
-       function t3lib_TCEforms() {
+       function __construct() {
                global $CLIENT, $TYPO3_CONF_VARS;
 
                $this->clientInfo = t3lib_div::clientInfo();
index 05189b4..d92129f 100644 (file)
@@ -87,7 +87,7 @@ class t3lib_xml {
         * @param       string          Top Level Name
         * @return      void
         */
-       function t3lib_xml($topLevelName) {
+       function __construct($topLevelName) {
                $this->topLevelName = $topLevelName;
        }
 
index e1a71e6..6ee2644 100644 (file)
@@ -137,7 +137,7 @@ class TBE_browser_recordList extends localRecordList {
         *
         * @return      void
         */
-       function TBE_browser_recordList () {
+       function __construct() {
                parent::__construct();
                $this->thisScript = t3lib_div::getIndpEnv('SCRIPT_NAME');
        }
@@ -246,7 +246,7 @@ class localPageTree extends t3lib_browseTree {
         *
         * @return      void
         */
-       function localPageTree() {
+       function __construct() {
                $this->thisScript = t3lib_div::getIndpEnv('SCRIPT_NAME');
 
                $this->init();
@@ -455,7 +455,7 @@ class localFolderTree extends t3lib_folderTree {
         *
         * @return      void
         */
-       function localFolderTree() {
+       function __construct() {
                $this->thisScript = t3lib_div::getIndpEnv('SCRIPT_NAME');
                $this->t3lib_folderTree();
        }
index 2cd7997..8c0703d 100644 (file)
@@ -65,15 +65,6 @@ class filelistFolderTree extends t3lib_folderTree {
        var $ajaxStatus = FALSE; // Indicates, whether the ajax call was successful, i.e. the requested page has been found
 
        /**
-        * Calls init functions
-        *
-        * @return      void
-        */
-       function filelistFolderTree() {
-               parent::t3lib_folderTree();
-       }
-
-       /**
         * Wrapping icon in browse tree
         *
         * @param       string          Icon IMG code
index 374afe0..801f4a6 100644 (file)
@@ -61,7 +61,7 @@ class recordHistory {
         *
         * @return      void
         */
-       function recordHistory()        {
+       function __construct()  {
                        // GPvars:
                $this->element = t3lib_div::_GP('element');
                $this->returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
index 1e89aec..3da88de 100644 (file)
@@ -79,7 +79,7 @@ class webPageTree extends t3lib_browseTree {
         *
         * @return      void
         */
-       function webPageTree() {
+       function __construct() {
                $this->init();
        }
 
index c5de184..acccc43 100755 (executable)
@@ -136,7 +136,7 @@ $BE_USER->modAccess($MCONF,1);
         * @param       array           Webmounts for the backend user.
         * @return      void
         */
-       function localPageTree($BE_USER,$WEBMOUNTS='')  {
+       function __construct($BE_USER,$WEBMOUNTS='')    {
                $this->init();
 
                $this->BE_USER = $BE_USER;
@@ -392,7 +392,7 @@ class printAllPageTree_perms extends printAllPageTree {
         * @param       array           Filemounts for the backend user.
         * @return      void
         */
-       function localFolderTree($BE_USER,$FILEMOUNTS='')       {
+       function __construct($BE_USER,$FILEMOUNTS='')   {
                $this->init();
 
                $this->BE_USER = $BE_USER;
index d819b3d..64ebad2 100644 (file)
         * @return      void
         * @see index_ts.php
         */
-       function tslib_fe($TYPO3_CONF_VARS, $id, $type, $no_cache='', $cHash='', $jumpurl='',$MP='',$RDCT='')   {
+       function __construct($TYPO3_CONF_VARS, $id, $type, $no_cache='', $cHash='', $jumpurl='',$MP='',$RDCT='')        {
 
                        // Setting some variables:
                $this->TYPO3_CONF_VARS = $TYPO3_CONF_VARS;
index 4f2b22e..82a67c4 100644 (file)
@@ -204,7 +204,7 @@ class tslib_pibase {
         *
         * @return      void
         */
-       function tslib_pibase() {
+       function __construct()  {
 
                        // Setting piVars:
                if ($this->prefixId)    {
index 3fbc00e..7405cc6 100644 (file)
@@ -44,7 +44,7 @@ interface tslib_menu_filterMenuPagesHook {
         * @param       tslib_menu      The menu object
         * @return      boolean         Returns TRUE if the page can be safely included.
         */
-       public function tslib_menu_filterMenuPagesHook (array &$data, array $banUidArray, $spacer, tslib_menu $obj);
+       public function __construct (array &$data, array $banUidArray, $spacer, tslib_menu $obj);
 }
 
 ?>
\ No newline at end of file
index c1e77db..bf1fea6 100755 (executable)
@@ -134,7 +134,7 @@ class localPageTree extends t3lib_browseTree {
         *
         * @return      void
         */
-       function localPageTree() {
+       function __construct() {
                $this->init();
        }
 
index f4db955..3db4742 100755 (executable)
@@ -107,7 +107,7 @@ class tx_indexedsearch_lexer {
         *
         * @return      void
         */
-       function tx_indexedsearch_lexer() {
+       function __construct() {
                $this->csObj = t3lib_div::makeInstance('t3lib_cs');
        }
 
index 7fae10e..0cb1011 100755 (executable)
@@ -263,8 +263,8 @@ class tx_install extends t3lib_install {
         *
         * @return void
         */
-       function tx_install() {
-               parent::t3lib_install();
+       function __construct() {
+               parent::__construct();
 
                if (!$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword']) {
                        $this->outputErrorAndExit('Install Tool deactivated.<br />You must enable it by setting a password in typo3conf/localconf.php. If you insert the line below, the password will be \'joh316\':<br /><br />$TYPO3_CONF_VARS[\'BE\'][\'installToolPassword\'] = \'bacb98acf97e0b6112b1d1b650b84971\';', 'Fatal error');
index 0f6c4cb..f9cc400 100644 (file)
@@ -53,10 +53,10 @@ class tx_lowlevel_admin_core extends t3lib_cli {
         *
         * @return      void
         */
-       function tx_lowlevel_admin_core()       {
+       function __construct()  {
 
                        // Running parent class constructor
-               parent::t3lib_cli();
+               parent::__construct();
 
                        // Adding options to help archive:
                $this->cli_options[] = array('--redirect=[URL]', 'For toolkey "setBElock": The URL to which the redirection will occur.');
index 5e0ac4d..a75132f 100644 (file)
@@ -84,10 +84,10 @@ class tx_lowlevel_cleaner_core extends t3lib_cli {
         *
         * @return      void
         */
-       function tx_lowlevel_cleaner_core()     {
+       function __construct()  {
 
                        // Running parent class constructor
-               parent::t3lib_cli();
+               parent::__construct();
 
                $this->cleanerModules = (array)$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lowlevel']['cleanerModules'];
 
index 55628e2..0c5ca06 100644 (file)
@@ -61,8 +61,8 @@ class tx_lowlevel_cleanflexform extends tx_lowlevel_cleaner_core {
         *
         * @return      void
         */
-       function tx_lowlevel_cleanflexform()    {
-               parent::tx_lowlevel_cleaner_core();
+       function __construct()  {
+               parent::__construct();
 
                        // Setting up help:
                $this->cli_options[] = array('--echotree level', 'When "level" is set to 1 or higher you will see the page of the page tree outputted as it is traversed. A value of 2 for "level" will show even more information.');
index 7a4504e..4ed5f19 100644 (file)
@@ -60,8 +60,8 @@ class tx_lowlevel_deleted extends tx_lowlevel_cleaner_core {
         *
         * @return      [type]          ...
         */
-       function tx_lowlevel_deleted()  {
-               parent::tx_lowlevel_cleaner_core();
+       function __construct()  {
+               parent::__construct();
 
                        // Setting up help:
                $this->cli_options[] = array('--echotree level', 'When "level" is set to 1 or higher you will see the page of the page tree outputted as it is traversed. A value of 2 for "level" will show even more information.');
index a2e8088..78bf510 100644 (file)
@@ -60,8 +60,8 @@ class tx_lowlevel_double_files extends tx_lowlevel_cleaner_core {
         *
         * @return      void
         */
-       function tx_lowlevel_double_files()     {
-               parent::tx_lowlevel_cleaner_core();
+       function __construct()  {
+               parent::__construct();
 
                        // Setting up help:
                $this->cli_help['name'] = 'double_files -- Looking for files from TYPO3 managed records which are referenced more than one time (only one time allowed)';
index 516e403..b2bb94c 100644 (file)
@@ -62,8 +62,8 @@ class tx_lowlevel_lost_files extends tx_lowlevel_cleaner_core {
         *
         * @return      void
         */
-       function tx_lowlevel_lost_files()       {
-               parent::tx_lowlevel_cleaner_core();
+       function __construct()  {
+               parent::__construct();
 
                $this->cli_options[] = array('--excludePath [path-list]', 'Comma separated list of paths to exclude. Example: "uploads/[path1],uploads/[path2],..."');
 
index 7a245b7..2a4f5cd 100644 (file)
@@ -62,8 +62,8 @@ class tx_lowlevel_missing_files extends tx_lowlevel_cleaner_core {
         *
         * @return      void
         */
-       function tx_lowlevel_missing_files()    {
-               parent::tx_lowlevel_cleaner_core();
+       function __construct()  {
+               parent::__construct();
 
                        // Setting up help:
                $this->cli_help['name'] = 'missing_files -- Find all file references from records pointing to a missing (non-existing) file.';
index a02594f..93616b1 100644 (file)
@@ -62,8 +62,8 @@ class tx_lowlevel_missing_relations extends tx_lowlevel_cleaner_core {
         *
         * @return      void
         */
-       function tx_lowlevel_missing_relations()        {
-               parent::tx_lowlevel_cleaner_core();
+       function __construct()  {
+               parent::__construct();
 
                        // Setting up help:
                $this->cli_help['name'] = 'missing_relations -- Find all record references pointing to a non-existing record.';
index 4b61475..9e3b7e9 100644 (file)
@@ -60,8 +60,8 @@ class tx_lowlevel_orphan_records extends tx_lowlevel_cleaner_core {
         *
         * @return      [type]          ...
         */
-       function tx_lowlevel_orphan_records()   {
-               parent::tx_lowlevel_cleaner_core();
+       function __construct()  {
+               parent::__construct();
 
                        // Setting up help:
                $this->cli_options[] = array('--echotree level', 'When "level" is set to 1 or higher you will see the page of the page tree outputted as it is traversed. A value of 2 for "level" will show even more information.');
index 8d13c9c..87ac800 100644 (file)
@@ -60,8 +60,8 @@ class tx_lowlevel_rte_images extends tx_lowlevel_cleaner_core {
         *
         * @return      void
         */
-       function tx_lowlevel_rte_images()       {
-               parent::tx_lowlevel_cleaner_core();
+       function __construct()  {
+               parent::__construct();
 
                        // Setting up help:
                $this->cli_help['name'] = 'rte_images -- Looking up all occurencies of RTEmagic images in the database and check existence of parent and copy files on the file system plus report possibly lost files of this type.';
index d5a4f98..41329eb 100644 (file)
@@ -61,8 +61,8 @@ class tx_lowlevel_syslog extends tx_lowlevel_cleaner_core {
         *
         * @return      void
         */
-       function tx_lowlevel_cleanflexform()    {
-               parent::tx_lowlevel_cleaner_core();
+       function __construct()  {
+               parent::__construct();
 
                $this->cli_help['name'] = 'syslog -- Show entries from syslog';
                $this->cli_help['description'] = trim('
index d97dd16..03a232b 100644 (file)
@@ -60,8 +60,8 @@ class tx_lowlevel_versions extends tx_lowlevel_cleaner_core {
         *
         * @return      void
         */
-       function tx_lowlevel_versions() {
-               parent::tx_lowlevel_cleaner_core();
+       function __construct()  {
+               parent::__construct();
 
                        // Setting up help:
                $this->cli_options[] = array('--echotree level', 'When "level" is set to 1 or higher you will see the page of the page tree outputted as it is traversed. A value of 2 for "level" will show even more information.');
index 8080cf5..018658f 100644 (file)
@@ -245,7 +245,7 @@ class template {
         *
         * @return      void
         */
-       function template()     {
+       function __construct()  {
                global $TBE_STYLES;
 
                        // Initializes the page rendering object: