[TASK] Remove global declarations inside methods
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 14 Jun 2011 07:15:55 +0000 (09:15 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Thu, 7 Jul 2011 17:43:12 +0000 (19:43 +0200)
Global declaration such as global $TCA or global $BE_USER should
be changed to $GLOBALS['TCA'], $GLOBALS['BE_USER'], ...

(And applied minor CGL-fixes which appeared on the way.)

Change-Id: Ic75c591bcf8433ca520d6860b8615d106d63db82
Relates: #25334
Reviewed-on: http://review.typo3.org/2730
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
46 files changed:
t3lib/class.t3lib_basicfilefunc.php
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_beuserauth.php
t3lib/class.t3lib_clipboard.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_extmgm.php
t3lib/class.t3lib_htmlmail.php
t3lib/class.t3lib_loadmodules.php
t3lib/class.t3lib_modsettings.php
t3lib/class.t3lib_rteapi.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_tsfebeuserauth.php
t3lib/class.t3lib_tsparser.php
t3lib/class.t3lib_tsstyleconfig.php
t3lib/class.t3lib_tstemplate.php
t3lib/class.t3lib_userauth.php
t3lib/class.t3lib_userauthgroup.php
t3lib/thumbs.php
typo3/alt_clickmenu.php
typo3/alt_doc.php
typo3/alt_doc_nodoc.php
typo3/alt_intro.php
typo3/alt_menu.php
typo3/alt_menu_sel.php
typo3/alt_shortcut.php
typo3/alt_toplogo.php
typo3/alt_topmenu_dummy.php
typo3/class.alt_menu_functions.inc
typo3/class.browse_links.php
typo3/class.db_list_extra.inc
typo3/classes/class.shortcutmenu.php
typo3/dummy.php
typo3/file_edit.php
typo3/file_rename.php
typo3/index.php
typo3/listframe_loader.php
typo3/login_frameset.php
typo3/show_item.php
typo3/template.php
typo3/view_help.php
typo3/wizard_colorpicker.php
typo3/wizard_forms.php
typo3/wizard_rte.php
typo3/wizard_table.php
typo3/wizard_tsconfig.php

index 6c5bcd5..6d7489f 100644 (file)
@@ -119,10 +119,10 @@ class t3lib_basicFileFunctions {
         *  Typically TYPO3_CONF_VARS['BE']['fileExtensions'] would be passed along as $f_ext.
         *
         *  Example:
-        *       $basicff->init($GLOBALS['FILEMOUNTS'],$TYPO3_CONF_VARS['BE']['fileExtensions']);
+        *       $basicff->init($GLOBALS['FILEMOUNTS'],$GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
         *
         * @param       array           Contains the paths of the file mounts for the current BE user. Normally $GLOBALS['FILEMOUNTS'] is passed. This variable is set during backend user initialization; $FILEMOUNTS = $GLOBALS['BE_USER']->returnFilemounts(); (see typo3/init.php)
-        * @param       array           Array with information about allowed and denied file extensions. Typically passed: $TYPO3_CONF_VARS['BE']['fileExtensions']
+        * @param       array           Array with information about allowed and denied file extensions. Typically passed: $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']
         * @return      void
         * @see typo3/init.php, t3lib_userAuthGroup::returnFilemounts()
         */
@@ -360,11 +360,9 @@ class t3lib_basicFileFunctions {
         * @return      string          The key to the first mount inside PATH_site."fileadmin" found, otherwise nothing is returned.
         */
        function findFirstWebFolder() {
-               global $TYPO3_CONF_VARS;
-
                if (is_array($this->mounts)) {
                        foreach ($this->mounts as $k => $val) {
-                               if (t3lib_div::isFirstPartOfStr($val['path'], PATH_site . $TYPO3_CONF_VARS['BE']['fileadminDir'])) {
+                               if (t3lib_div::isFirstPartOfStr($val['path'], PATH_site . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'])) {
                                        return $k;
                                }
                        }
index 1b37bcd..6470e0d 100644 (file)
@@ -1011,8 +1011,6 @@ final class t3lib_BEfunc {
         * @see t3lib_TCEforms::getSingleField_typeFlex()
         */
        public static function getFlexFormDS($conf, $row, $table, $fieldName = '', $WSOL = TRUE, $newRecordPidValue = 0) {
-               global $TYPO3_CONF_VARS;
-
                        // Get pointer field etc from TCA-config:
                $ds_pointerField = $conf['ds_pointerField'];
                $ds_array = $conf['ds'];
@@ -1131,8 +1129,8 @@ final class t3lib_BEfunc {
                }
 
                        // Hook for post-processing the Flexform DS. Introduces the possibility to configure Flexforms via TSConfig
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['getFlexFormDSClass'])) {
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['getFlexFormDSClass'] as $classRef) {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['getFlexFormDSClass'])) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['getFlexFormDSClass'] as $classRef) {
                                $hookObj = t3lib_div::getUserObj($classRef);
                                if (method_exists($hookObj, 'getFlexFormDS_postProcessDS')) {
                                        $hookObj->getFlexFormDS_postProcessDS($dataStructArray, $conf, $row, $table, $fieldName);
@@ -1568,7 +1566,7 @@ final class t3lib_BEfunc {
        }
 
        /**
-        * Returns $tstamp formatted as "ddmmyy" (According to $TYPO3_CONF_VARS['SYS']['ddmmyy'])
+        * Returns $tstamp formatted as "ddmmyy" (According to $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'])
         * Usage: 11
         *
         * @param       integer         Time stamp, seconds
@@ -1579,7 +1577,7 @@ final class t3lib_BEfunc {
        }
 
        /**
-        * Returns $tstamp formatted as "ddmmyy hhmm" (According to $TYPO3_CONF_VARS['SYS']['ddmmyy'] AND $TYPO3_CONF_VARS['SYS']['hhmm'])
+        * Returns $tstamp formatted as "ddmmyy hhmm" (According to $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] AND $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'])
         * Usage: 28
         *
         * @param       integer         Time stamp, seconds
@@ -1670,7 +1668,7 @@ final class t3lib_BEfunc {
 
        /**
         * Returns a linked image-tag for thumbnail(s)/fileicons/truetype-font-previews from a database row with a list of image files in a field
-        * All $TYPO3_CONF_VARS['GFX']['imagefile_ext'] extension are made to thumbnails + ttf file (renders font-example)
+        * All $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] extension are made to thumbnails + ttf file (renders font-example)
         * Thumbsnails are linked to the show_item.php script which will display further details.
         * Usage: 7
         *
@@ -2274,10 +2272,10 @@ final class t3lib_BEfunc {
                        /*****************
                         *HOOK: post-processing the human readable output from a record
                         ****************/
-                       if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['postProcessValue'])) {
+                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['postProcessValue'])) {
                                        // create NULL-reference
                                $null = NULL;
-                               foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['postProcessValue'] as $_funcRef) {
+                               foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['postProcessValue'] as $_funcRef) {
                                        $params = array(
                                                'value' => $l,
                                                'colConf' => $theColConf
@@ -3224,9 +3222,8 @@ final class t3lib_BEfunc {
         * @see class.db_layout.inc, alt_db_navframe.php, alt_doc.php, db_layout.php
         */
        public static function isRecordLocked($table, $uid) {
-               global $LOCKED_RECORDS;
-               if (!is_array($LOCKED_RECORDS)) {
-                       $LOCKED_RECORDS = array();
+               if (!is_array($GLOBALS['LOCKED_RECORDS'])) {
+                       $GLOBALS['LOCKED_RECORDS'] = array();
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                '*',
                                'sys_lockedrecords',
@@ -3250,15 +3247,15 @@ final class t3lib_BEfunc {
                                        $userName = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.unknownUser');
                                }
 
-                               $LOCKED_RECORDS[$row['record_table'] . ':' . $row['record_uid']] = $row;
-                               $LOCKED_RECORDS[$row['record_table'] . ':' . $row['record_uid']]['msg'] = sprintf(
+                               $GLOBALS['LOCKED_RECORDS'][$row['record_table'] . ':' . $row['record_uid']] = $row;
+                               $GLOBALS['LOCKED_RECORDS'][$row['record_table'] . ':' . $row['record_uid']]['msg'] = sprintf(
                                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.lockedRecordUser'),
                                        $userType,
                                        $userName,
                                        self::calcAge($GLOBALS['EXEC_TIME'] - $row['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears'))
                                );
-                               if ($row['record_pid'] && !isset($LOCKED_RECORDS[$row['record_table'] . ':' . $row['record_pid']])) {
-                                       $LOCKED_RECORDS['pages:' . $row['record_pid']]['msg'] = sprintf(
+                               if ($row['record_pid'] && !isset($GLOBALS['LOCKED_RECORDS'][$row['record_table'] . ':' . $row['record_pid']])) {
+                                       $GLOBALS['LOCKED_RECORDS']['pages:' . $row['record_pid']]['msg'] = sprintf(
                                                $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.lockedRecordUser_content'),
                                                $userType,
                                                $userName,
@@ -3268,7 +3265,7 @@ final class t3lib_BEfunc {
                        }
                        $GLOBALS['TYPO3_DB']->sql_free_result($res);
                }
-               return $LOCKED_RECORDS[$table . ':' . $uid];
+               return $GLOBALS['LOCKED_RECORDS'][$table . ':' . $uid];
        }
 
        /**
@@ -4245,11 +4242,9 @@ final class t3lib_BEfunc {
         * @return      void
         */
        public static function TYPO3_copyRightNotice() {
-               global $TYPO3_CONF_VARS;
-
                        // COPYRIGHT NOTICE:
-               $loginCopyrightWarrantyProvider = strip_tags(trim($TYPO3_CONF_VARS['SYS']['loginCopyrightWarrantyProvider']));
-               $loginCopyrightWarrantyURL = strip_tags(trim($TYPO3_CONF_VARS['SYS']['loginCopyrightWarrantyURL']));
+               $loginCopyrightWarrantyProvider = strip_tags(trim($GLOBALS['TYPO3_CONF_VARS']['SYS']['loginCopyrightWarrantyProvider']));
+               $loginCopyrightWarrantyURL = strip_tags(trim($GLOBALS['TYPO3_CONF_VARS']['SYS']['loginCopyrightWarrantyURL']));
 
                if (strlen($loginCopyrightWarrantyProvider) >= 2 && strlen($loginCopyrightWarrantyURL) >= 10) {
                        $warrantyNote = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_login.xml:warranty.by'),
@@ -4571,4 +4566,4 @@ final class t3lib_BEfunc {
        }
 }
 
-?>
\ No newline at end of file
+?>
index 11cbc47..56af690 100644 (file)
@@ -170,9 +170,8 @@ class t3lib_beUserAuth extends t3lib_userAuthGroup {
         * @access private
         */
        function checkLockToIP() {
-               global $TYPO3_CONF_VARS;
                $out = 1;
-               if ($TYPO3_CONF_VARS['BE']['enabledBeUserIPLock']) {
+               if ($GLOBALS['TYPO3_CONF_VARS']['BE']['enabledBeUserIPLock']) {
                        $IPList = $this->getTSConfigVal('options.lockToIP');
                        if (trim($IPList)) {
                                $baseIP = t3lib_div::getIndpEnv('REMOTE_ADDR');
@@ -247,8 +246,6 @@ class t3lib_beUserAuth extends t3lib_userAuthGroup {
         * @internal
         */
        function backendSetUC() {
-               global $TYPO3_CONF_VARS;
-
                        // UC - user configuration is a serialized array inside the userobject
                $temp_theSavedUC = unserialize($this->user['uc']); // if there is a saved uc we implement that instead of the default one.
                if (is_array($temp_theSavedUC)) {
@@ -258,7 +255,7 @@ class t3lib_beUserAuth extends t3lib_userAuthGroup {
                if (!is_array($this->uc)) {
                        $this->uc = array_merge(
                                $this->uc_default,
-                               (array) $TYPO3_CONF_VARS['BE']['defaultUC'],
+                               (array) $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultUC'],
                                t3lib_div::removeDotsFromTS((array) $this->getTSConfigProp('setup.default'))
                        );
                        $this->overrideUC();
index 4a775bb..00c655b 100644 (file)
@@ -404,8 +404,6 @@ class t3lib_clipboard {
         * @access private
         */
        function printContentFromTab($pad) {
-               global $TBE_TEMPLATE;
-
                $lines = array();
                if (is_array($this->clipData[$pad]['el'])) {
                        foreach ($this->clipData[$pad]['el'] as $k => $v) {
index 17505a9..9e17c93 100644 (file)
@@ -986,8 +986,7 @@ final class t3lib_div {
         * @todo        Still needs a function to convert versions to branches
         */
        public static function compat_version($verNumberStr) {
-               global $TYPO3_CONF_VARS;
-               $currVersionStr = $TYPO3_CONF_VARS['SYS']['compat_version'] ? $TYPO3_CONF_VARS['SYS']['compat_version'] : TYPO3_branch;
+               $currVersionStr = $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] : TYPO3_branch;
 
                if (self::int_from_ver($currVersionStr) < self::int_from_ver($verNumberStr)) {
                        return FALSE;
@@ -2524,8 +2523,6 @@ final class t3lib_div {
         * @see array2xml()
         */
        protected function xml2arrayProcess($string, $NSprefix = '', $reportDocTag = FALSE) {
-               global $TYPO3_CONF_VARS;
-
                        // Create parser:
                $parser = xml_parser_create();
                $vals = array();
@@ -2537,7 +2534,7 @@ final class t3lib_div {
                        // default output charset is UTF-8, only ASCII, ISO-8859-1 and UTF-8 are supported!!!
                $match = array();
                preg_match('/^[[:space:]]*<\?xml[^>]*encoding[[:space:]]*=[[:space:]]*"([^"]*)"/', substr($string, 0, 200), $match);
-               $theCharset = $match[1] ? $match[1] : ($TYPO3_CONF_VARS['BE']['forceCharset'] ? $TYPO3_CONF_VARS['BE']['forceCharset'] : 'iso-8859-1');
+               $theCharset = $match[1] ? $match[1] : ($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] ? $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] : 'iso-8859-1');
                xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $theCharset); // us-ascii / utf-8 / iso-8859-1
 
                        // Parse content:
@@ -2717,7 +2714,7 @@ final class t3lib_div {
 
        /**
         * Reads the file or url $url and returns the content
-        * If you are having trouble with proxys when reading URLs you can configure your way out of that with settings like $TYPO3_CONF_VARS['SYS']['curlUse'] etc.
+        * If you are having trouble with proxys when reading URLs you can configure your way out of that with settings like $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlUse'] etc.
         * Usage: 83
         *
         * @param       string          File/URL to read
@@ -3348,7 +3345,7 @@ final class t3lib_div {
         * the maxFileSize, usually for the TCA values.
         *
         * @param       integer         $localLimit: the number of Kilobytes (!) that should be used as
-        *                                              the initial Limit, otherwise $TYPO3_CONF_VARS['BE']['maxFileSize'] will be used
+        *                                              the initial Limit, otherwise $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'] will be used
         * @return      integer         the maximum size of uploads that are allowed (measuered in kilobytes)
         */
        public static function getMaxUploadFileSize($localLimit = 0) {
@@ -4825,7 +4822,6 @@ final class t3lib_div {
         * @see getUserObj()
         */
        public static function callUserFunction($funcName, &$params, &$ref, $checkPrefix = 'user_', $errorMode = 0) {
-               global $TYPO3_CONF_VARS;
                $content = FALSE;
 
                        // Check persistent object and if found, call directly and exit.
@@ -4941,7 +4937,6 @@ final class t3lib_div {
         * @see callUserFunction()
         */
        public static function getUserObj($classRef, $checkPrefix = 'user_', $silent = FALSE) {
-               global $TYPO3_CONF_VARS;
                        // Check persistent object and if found, call directly and exit.
                if (is_object($GLOBALS['T3_VAR']['getUserObj'][$classRef])) {
                        return $GLOBALS['T3_VAR']['getUserObj'][$classRef];
@@ -5193,8 +5188,6 @@ final class t3lib_div {
         * @author      René Fritz <r.fritz@colorcube.de>
         */
        public static function makeInstanceService($serviceType, $serviceSubType = '', $excludeServiceKeys = array()) {
-               global $T3_SERVICES, $T3_VAR, $TYPO3_CONF_VARS;
-
                $error = FALSE;
 
                if (!is_array($excludeServiceKeys)) {
@@ -5205,7 +5198,7 @@ final class t3lib_div {
                                // Check persistent object and if found, call directly and exit.
                        if (is_object($GLOBALS['T3_VAR']['makeInstanceService'][$info['className']])) {
                                        // reset service and return object
-                               $T3_VAR['makeInstanceService'][$info['className']]->reset();
+                               $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']]->reset();
                                return $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']];
 
                                // include file and create object
@@ -5223,7 +5216,7 @@ final class t3lib_div {
                                                if ($obj->init()) { // service available?
 
                                                                // create persistent object
-                                                       $T3_VAR['makeInstanceService'][$info['className']] = $obj;
+                                                       $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']] = $obj;
 
                                                                // needed to delete temp files
                                                        register_shutdown_function(array(&$obj, '__destruct'));
@@ -5246,6 +5239,7 @@ final class t3lib_div {
         * Useful to require classes from inside other classes (not global scope). A limited set of global variables are available (see function)
         */
        public static function requireOnce($requireFile) {
+                       // Needed for require_once
                global $T3_SERVICES, $T3_VAR, $TYPO3_CONF_VARS;
 
                require_once ($requireFile);
@@ -5260,6 +5254,7 @@ final class t3lib_div {
         * @return      void
         */
        public static function requireFile($requireFile) {
+                       // Needed for require
                global $T3_SERVICES, $T3_VAR, $TYPO3_CONF_VARS;
                require $requireFile;
        }
@@ -5533,29 +5528,27 @@ final class t3lib_div {
         * @see sysLog()
         */
        public static function initSysLog() {
-               global $TYPO3_CONF_VARS;
-
                        // for CLI logging name is <fqdn-hostname>:<TYPO3-path>
                        // Note that TYPO3_REQUESTTYPE is not used here as it may not yet be defined
                if (defined('TYPO3_cliMode') && TYPO3_cliMode) {
-                       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] = self::getHostname($requestHost = FALSE) . ':' . PATH_site;
+                       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] = self::getHostname($requestHost = FALSE) . ':' . PATH_site;
                }
                        // for Web logging name is <protocol>://<request-hostame>/<site-path>
                else {
-                       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] = self::getIndpEnv('TYPO3_SITE_URL');
+                       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] = self::getIndpEnv('TYPO3_SITE_URL');
                }
 
                        // init custom logging
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog'])) {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog'])) {
                        $params = array('initLog' => TRUE);
                        $fakeThis = FALSE;
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog'] as $hookMethod) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog'] as $hookMethod) {
                                self::callUserFunction($hookMethod, $params, $fakeThis);
                        }
                }
 
                        // init TYPO3 logging
-               foreach (explode(';', $TYPO3_CONF_VARS['SYS']['systemLog'], 2) as $log) {
+               foreach (explode(';', $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLog'], 2) as $log) {
                        list($type, $destination) = explode(',', $log, 3);
 
                        if ($type == 'syslog') {
@@ -5564,12 +5557,12 @@ final class t3lib_div {
                                } else {
                                        $facility = constant('LOG_' . strtoupper($destination));
                                }
-                               openlog($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'], LOG_ODELAY, $facility);
+                               openlog($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'], LOG_ODELAY, $facility);
                        }
                }
 
-               $TYPO3_CONF_VARS['SYS']['systemLogLevel'] = self::intInRange($TYPO3_CONF_VARS['SYS']['systemLogLevel'], 0, 4);
-               $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogInit'] = TRUE;
+               $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] = self::intInRange($GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'], 0, 4);
+               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogInit'] = TRUE;
        }
 
        /**
@@ -5584,32 +5577,30 @@ final class t3lib_div {
         * @return      void
         */
        public static function sysLog($msg, $extKey, $severity = 0) {
-               global $TYPO3_CONF_VARS;
-
                $severity = self::intInRange($severity, 0, 4);
 
                        // is message worth logging?
-               if (intval($TYPO3_CONF_VARS['SYS']['systemLogLevel']) > $severity) {
+               if (intval($GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel']) > $severity) {
                        return;
                }
 
                        // initialize logging
-               if (!$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogInit']) {
+               if (!$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogInit']) {
                        self::initSysLog();
                }
 
                        // do custom logging
-               if (isset($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog']) &&
-                               is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog'])) {
+               if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog']) &&
+                               is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog'])) {
                        $params = array('msg' => $msg, 'extKey' => $extKey, 'backTrace' => debug_backtrace(), 'severity' => $severity);
                        $fakeThis = FALSE;
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog'] as $hookMethod) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog'] as $hookMethod) {
                                self::callUserFunction($hookMethod, $params, $fakeThis);
                        }
                }
 
                        // TYPO3 logging enabled?
-               if (!$TYPO3_CONF_VARS['SYS']['systemLog']) {
+               if (!$GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLog']) {
                        return;
                }
 
@@ -5617,7 +5608,7 @@ final class t3lib_div {
                $timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
 
                        // use all configured logging options
-               foreach (explode(';', $TYPO3_CONF_VARS['SYS']['systemLog'], 2) as $log) {
+               foreach (explode(';', $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLog'], 2) as $log) {
                        list($type, $destination, $level) = explode(',', $log, 4);
 
                                // is message worth logging for this log type?
@@ -5649,7 +5640,7 @@ final class t3lib_div {
                                $mail->setTo($to)
                                                ->setFrom($from)
                                                ->setSubject('Warning - error in TYPO3 installation')
-                                               ->setBody('Host: ' . $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] . LF .
+                                               ->setBody('Host: ' . $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] . LF .
                                                                'Extension: ' . $extKey . LF .
                                                                'Severity: ' . $severity . LF .
                                                                LF . $msg
@@ -5658,7 +5649,7 @@ final class t3lib_div {
                        }
                                // use the PHP error log
                        elseif ($type == 'error_log') {
-                               error_log($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] . $msgLine, 0);
+                               error_log($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] . $msgLine, 0);
                        }
                                // use the system log
                        elseif ($type == 'syslog') {
@@ -5683,12 +5674,10 @@ final class t3lib_div {
         * @return      void
         */
        public static function devLog($msg, $extKey, $severity = 0, $dataVar = FALSE) {
-               global $TYPO3_CONF_VARS;
-
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['devLog'])) {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['devLog'])) {
                        $params = array('msg' => $msg, 'extKey' => $extKey, 'severity' => $severity, 'dataVar' => $dataVar);
                        $fakeThis = FALSE;
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['devLog'] as $hookMethod) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['devLog'] as $hookMethod) {
                                self::callUserFunction($hookMethod, $params, $fakeThis);
                        }
                }
index d9b1b19..3d85fc2 100644 (file)
@@ -115,14 +115,13 @@ final class t3lib_extMgm {
         * @return      boolean
         */
        public static function isLoaded($key, $exitOnError = 0) {
-               global $TYPO3_LOADED_EXT;
-               if ($exitOnError && !isset($TYPO3_LOADED_EXT[$key])) {
+               if ($exitOnError && !isset($GLOBALS['TYPO3_LOADED_EXT'][$key])) {
                        throw new BadFunctionCallException(
                                'TYPO3 Fatal Error: Extension "' . $key . '" was not loaded!',
                                1270853910
                        );
                }
-               return isset($TYPO3_LOADED_EXT[$key]);
+               return isset($GLOBALS['TYPO3_LOADED_EXT'][$key]);
        }
 
        /**
@@ -136,14 +135,13 @@ final class t3lib_extMgm {
         * @return      string
         */
        public static function extPath($key, $script = '') {
-               global $TYPO3_LOADED_EXT;
-               if (!isset($TYPO3_LOADED_EXT[$key])) {
+               if (!isset($GLOBALS['TYPO3_LOADED_EXT'][$key])) {
                        throw new BadFunctionCallException(
                                'TYPO3 Fatal Error: Extension key "' . $key . '" was NOT loaded!',
                                1270853878
                        );
                }
-               return PATH_site . $TYPO3_LOADED_EXT[$key]['siteRelPath'] . $script;
+               return PATH_site . $GLOBALS['TYPO3_LOADED_EXT'][$key]['siteRelPath'] . $script;
        }
 
        /**
@@ -156,14 +154,13 @@ final class t3lib_extMgm {
         * @return      string
         */
        public static function extRelPath($key) {
-               global $TYPO3_LOADED_EXT;
-               if (!isset($TYPO3_LOADED_EXT[$key])) {
+               if (!isset($GLOBALS['TYPO3_LOADED_EXT'][$key])) {
                        throw new BadFunctionCallException(
                                'TYPO3 Fatal Error: Extension key "' . $key . '" was NOT loaded!',
                                1270853879
                        );
                }
-               return $TYPO3_LOADED_EXT[$key]['typo3RelPath'];
+               return $GLOBALS['TYPO3_LOADED_EXT'][$key]['typo3RelPath'];
        }
 
        /**
@@ -1368,14 +1365,14 @@ tt_content.' . $key . $prefix . ' {
         ***************************************/
 
        /**
-        * Loading extensions configured in $TYPO3_CONF_VARS['EXT']['extList']
+        * Loading extensions configured in $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList']
         *
-        * CACHING ON: ($TYPO3_CONF_VARS['EXT']['extCache'] = 1 or 2)
+        * CACHING ON: ($GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache'] = 1 or 2)
         *               If caching is enabled (and possible), the output will be $extensions['_CACHEFILE'] set to the cacheFilePrefix. Subsequently the cache files must be included then since those will eventually set up the extensions.
         *               If cachefiles are not found they will be generated
-        * CACHING OFF: ($TYPO3_CONF_VARS['EXT']['extCache'] = 0)
+        * CACHING OFF: ($GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache'] = 0)
         *               The returned value will be an array where each key is an extension key and the value is an array with filepaths for the extension.
-        *               This array will later be set in the global var $TYPO3_LOADED_EXT
+        *               This array will later be set in the global var $GLOBALS['TYPO3_LOADED_EXT']
         *
         * Usages of this function can be seen in config_default.php
         * Extensions are always detected in the order local - global - system.
@@ -1385,7 +1382,6 @@ tt_content.' . $key . $prefix . ' {
         * @internal
         */
        public static function typo3_loadExtensions() {
-               global $TYPO3_CONF_VARS;
 
                        // Caching behaviour of ext_tables.php and ext_localconf.php files:
                $extensionCacheBehaviour = self::getExtensionCacheBehaviour();
@@ -1439,7 +1435,7 @@ tt_content.' . $key . $prefix . ' {
                                                                @is_dir(PATH_typo3 . 'ext/')) { // Must also find global and system extension directories to exist, otherwise caching cannot be allowed (since it is most likely a temporary server problem). This might fix a rare, unrepeatable bug where global/system extensions are not loaded resulting in fatal errors if that is cached!
                                        $wrError = self::cannotCacheFilesWritable($cacheFilePrefix);
                                        if ($wrError) {
-                                               $TYPO3_CONF_VARS['EXT']['extCache'] = 0;
+                                               $GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache'] = 0;
                                        } else {
                                                        // Write cache files:
                                                $extensions = self::writeCacheFiles($extensions, $cacheFilePrefix);
@@ -1467,7 +1463,7 @@ tt_content.' . $key . $prefix . ' {
 ###########################
 
 $_EXTKEY = \'' . $key . '\';
-$_EXTCONF = $TYPO3_CONF_VARS[\'EXT\'][\'extConf\'][$_EXTKEY];
+$_EXTCONF = $GLOBALS[\'TYPO3_CONF_VARS\'][\'EXT\'][\'extConf\'][$_EXTKEY];
 
 ?>';
        }
@@ -1524,7 +1520,7 @@ $_EXTCONF = $TYPO3_CONF_VARS[\'EXT\'][\'extConf\'][$_EXTKEY];
 
        /**
         * Returns an array with the two cache-files (0=>localconf, 1=>tables) from typo3conf/ if they (both) exist. Otherwise FALSE.
-        * Evaluation relies on $TYPO3_LOADED_EXT['_CACHEFILE']
+        * Evaluation relies on $GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE']
         * Usage: 2
         *
         * @param string $cacheFilePrefix Cache file prefix to be used (optional)
@@ -1569,7 +1565,7 @@ $_EXTCONF = $TYPO3_CONF_VARS[\'EXT\'][\'extConf\'][$_EXTKEY];
                $cFiles = array();
                $cFiles['ext_localconf'] .= '<?php
 
-$TYPO3_LOADED_EXT = unserialize(stripslashes(\'' . addslashes(serialize($extensions)) . '\'));
+$GLOBALS[\'TYPO3_LOADED_EXT\'] = unserialize(stripslashes(\'' . addslashes(serialize($extensions)) . '\'));
 
 ?>';
 
@@ -1620,7 +1616,7 @@ $TYPO3_LOADED_EXT = unserialize(stripslashes(\'' . addslashes(serialize($extensi
 
        /**
         * Gets the behaviour for caching ext_tables.php and ext_localconf.php files
-        * (see $TYPO3_CONF_VARS['EXT']['extCache'] setting in the install tool).
+        * (see $GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache'] setting in the install tool).
         *
         * @param boolean $usePlainValue Whether to use the value as it is without modifications
         * @return integer
index 30ec148..c81ae1b 100644 (file)
@@ -256,12 +256,10 @@ class t3lib_htmlmail {
         * @return      void
         */
        public function start() {
-               global $TYPO3_CONF_VARS;
-
                        // Sets the message id
                $host = t3lib_div::getHostname();
                if (!$host || $host == '127.0.0.1' || $host == 'localhost' || $host == 'localhost.localdomain') {
-                       $host = ($TYPO3_CONF_VARS['SYS']['sitename'] ? preg_replace('/[^A-Za-z0-9_\-]/', '_', $TYPO3_CONF_VARS['SYS']['sitename']) : 'localhost') . '.TYPO3';
+                       $host = ($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] ? preg_replace('/[^A-Za-z0-9_\-]/', '_', $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) : 'localhost') . '.TYPO3';
                }
 
                $idLeft = time() . '.' . uniqid();
index 06fdea4..d0f2f75 100644 (file)
@@ -219,8 +219,6 @@ class t3lib_loadModules {
         * @return      string          If found, the relative path from PATH_site
         */
        function checkExtensionModule($name) {
-               global $TYPO3_LOADED_EXT;
-
                if (isset($this->absPathArray[$name])) {
                        return rtrim(substr($this->absPathArray[$name], strlen(PATH_site)), '/');
                }
index 9187794..629968a 100644 (file)
@@ -95,7 +95,7 @@
  *
  * Format of saved settings
  *
- *     $SOBE->MOD_SETTINGS[$this->prefix.'_storedSettings'] = serialize(
+ *     $GLOBALS['SOBE']->MOD_SETTINGS[$this->prefix.'_storedSettings'] = serialize(
  *             array (
  *                     'any id' => array (
  *                                     'title' => 'title for saved settings',
@@ -240,11 +240,9 @@ class t3lib_modSettings {
         * @return      void
         */
        function addToStoreListFromPrefix($prefix = '') {
-               global $SOBE;
-
                $prefix = $prefix ? $prefix : $this->prefix;
 
-               foreach ($SOBE->MOD_SETTINGS as $key => $value) {
+               foreach ($GLOBALS['SOBE']->MOD_SETTINGS as $key => $value) {
                        if (preg_match('/^' . $prefix . '/', $key)) {
                                $this->storeList[$key] = $key;
                        }
@@ -271,9 +269,7 @@ class t3lib_modSettings {
         * @return      void
         */
        function initStorage() {
-               global $SOBE;
-
-               $storedSettings = unserialize($SOBE->MOD_SETTINGS[$this->prefix . '_storedSettings']);
+               $storedSettings = unserialize($GLOBALS['SOBE']->MOD_SETTINGS[$this->prefix . '_storedSettings']);
                $this->storedSettings = $this->cleanupStorageArray($storedSettings);
        }
 
@@ -313,11 +309,9 @@ class t3lib_modSettings {
         * @return      array           $storageArr: entry for the stored settings array
         */
        function compileEntry($data) {
-               global $SOBE;
-
                $storageData = array();
                foreach ($this->storeList as $MS_key) {
-                       $storageData[$MS_key] = $SOBE->MOD_SETTINGS[$MS_key];
+                       $storageData[$MS_key] = $GLOBALS['SOBE']->MOD_SETTINGS[$MS_key];
                }
                $storageArr = array(
                        'title' => $data['title'],
@@ -437,16 +431,14 @@ class t3lib_modSettings {
         * @return      void
         */
        function writeStoredSetting($writeArray = array(), $mconfName = '') {
-               global $SOBE;
-
                        // for debugging: just removes all module data from user settings
-                       // $GLOBALS['BE_USER']->pushModuleData($SOBE->MCONF['name'],array());
+                       // $GLOBALS['BE_USER']->pushModuleData($GLOBALS['SOBE']->MCONF['name'],array());
 
                unset($this->storedSettings[0]); // making sure, index 0 is not set!
                $this->storedSettings = $this->cleanupStorageArray($this->storedSettings);
                $writeArray[$this->prefix . '_storedSettings'] = serialize($this->storedSettings);
 
-               $SOBE->MOD_SETTINGS = t3lib_BEfunc::getModuleData($SOBE->MOD_MENU, $writeArray, ($mconfName ? $mconfName : $SOBE->MCONF['name']), $this->type);
+               $GLOBALS['SOBE']->MOD_SETTINGS = t3lib_BEfunc::getModuleData($GLOBALS['SOBE']->MOD_MENU, $writeArray, ($mconfName ? $mconfName : $GLOBALS['SOBE']->MCONF['name']), $this->type);
 
                if ($this->writeDevLog) {
                        t3lib_div::devLog('Settings stored:' . $this->msg, 't3lib_modSettings', 0);
@@ -469,8 +461,6 @@ class t3lib_modSettings {
         * @return      string          HTML code
         */
        function getStoreControl($showElements = 'load,remove,save', $useOwnForm = TRUE) {
-               global $TYPO3_CONF_VARS;
-
                $showElements = t3lib_div::trimExplode(',', $showElements, 1);
 
                $this->initStorage();
@@ -546,7 +536,7 @@ class t3lib_modSettings {
                #TODO need to add parameters
                if ($useOwnForm AND trim($code)) {
                        $code = '
-               <form action="' . t3lib_div::getIndpEnv('SCRIPT_NAME') . '" method="post" name="' . $this->formName . '" enctype="' . $TYPO3_CONF_VARS['SYS']['form_enctype'] . '">' . $code . '</form>';
+               <form action="' . t3lib_div::getIndpEnv('SCRIPT_NAME') . '" method="post" name="' . $this->formName . '" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '">' . $code . '</form>';
                }
 
                return $code;
index dc12ff4..b159c55 100644 (file)
@@ -82,10 +82,8 @@ class t3lib_rteapi {
         * @return      boolean         TRUE if this RTE object offers an RTE in the current browser environment
         */
        function isAvailable() {
-               global $CLIENT;
-
                $this->errorLog = array();
-               if (!$CLIENT['FORMSTYLE']) {
+               if (!$GLOBALS['CLIENT']['FORMSTYLE']) {
                        $this->errorLog[] = 'RTE API: Browser didn\'t support styles';
                }
 
index c05d9b8..0dce214 100644 (file)
@@ -224,7 +224,7 @@ class t3lib_TCEforms {
        var $enableTabMenu = FALSE; // Enable Tab Menus.
        var $renderReadonly = FALSE; // When enabled all fields are rendered non-editable.
 
-       var $form_rowsToStylewidth = 9.58; // Form field width compensation: Factor from NN4 form field widths to style-aware browsers (like NN6+ and MSIE, with the $CLIENT[FORMSTYLE] value set)
+       var $form_rowsToStylewidth = 9.58; // Form field width compensation: Factor from NN4 form field widths to style-aware browsers (like NN6+ and MSIE, with the $GLOBALS['CLIENT']['FORMSTYLE'] value set)
        var $form_largeComp = 1.33; // Form field width compensation: Compensation for large documents, doc-tab (editing)
        var $charsPerRow = 40; // The number of chars expected per row when the height of a text area field is automatically calculated based on the number of characters found in the field content.
        var $maxTextareaWidth = 48; // The maximum abstract value for textareas
@@ -304,8 +304,6 @@ class t3lib_TCEforms {
         * @return      void
         */
        function __construct() {
-               global $CLIENT, $TYPO3_CONF_VARS;
-
                $this->clientInfo = t3lib_div::clientInfo();
 
                $this->RTEenabled = $GLOBALS['BE_USER']->isRTE();
@@ -352,14 +350,14 @@ class t3lib_TCEforms {
 
                        // Prepare user defined objects (if any) for hooks which extend this function:
                $this->hookObjectsMainFields = array();
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'])) {
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'] as $classRef) {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'])) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'] as $classRef) {
                                $this->hookObjectsMainFields[] = t3lib_div::getUserObj($classRef);
                        }
                }
                $this->hookObjectsSingleField = array();
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getSingleFieldClass'])) {
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getSingleFieldClass'] as $classRef) {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getSingleFieldClass'])) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getSingleFieldClass'] as $classRef) {
                                $this->hookObjectsSingleField[] = t3lib_div::getUserObj($classRef);
                        }
                }
index 785b776..2318f09 100644 (file)
@@ -283,7 +283,7 @@ class t3lib_TCEmain {
        var $username; // will be set to username of be_user executing this script
        var $admin; // will be set if user is admin
 
-       var $defaultPermissions = array( // Can be overridden from $TYPO3_CONF_VARS
+       var $defaultPermissions = array( // Can be overridden from $GLOBALS['TYPO3_CONF_VARS']
                'user' => 'show,edit,delete,new,editcontent',
                'group' => 'show,edit,new,editcontent',
                'everybody' => ''
@@ -3312,8 +3312,6 @@ class t3lib_TCEmain {
         * @return      void
         */
        function copyRecord_fixRTEmagicImages($table, $theNewSQLID) {
-               global $TYPO3_DB;
-
                        // Creating fileFunc object.
                if (!$this->fileFunc) {
                        $this->fileFunc = t3lib_div::makeInstance('t3lib_basicFileFunctions');
@@ -3321,14 +3319,13 @@ class t3lib_TCEmain {
                }
 
                        // Select all RTEmagic files in the reference table from the table/ID
-               /* @var $TYPO3_DB t3lib_DB */
-               $recs = $TYPO3_DB->exec_SELECTgetRows(
+               $recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                        '*',
                        'sys_refindex',
-                       'ref_table=' . $TYPO3_DB->fullQuoteStr('_FILE', 'sys_refindex') .
-                       ' AND ref_string LIKE ' . $TYPO3_DB->fullQuoteStr('%/RTEmagic%', 'sys_refindex') .
-                       ' AND softref_key=' . $TYPO3_DB->fullQuoteStr('images', 'sys_refindex') .
-                       ' AND tablename=' . $TYPO3_DB->fullQuoteStr($table, 'sys_refindex') .
+                       'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_FILE', 'sys_refindex') .
+                       ' AND ref_string LIKE ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('%/RTEmagic%', 'sys_refindex') .
+                       ' AND softref_key=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('images', 'sys_refindex') .
+                       ' AND tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') .
                        ' AND recuid=' . intval($theNewSQLID),
                        '',
                        'sorting DESC'
@@ -3990,16 +3987,14 @@ class t3lib_TCEmain {
         * @return      void
         */
        function deleteAction($table, $id) {
-               global $TYPO3_CONF_VARS;
-
                $recordToDelete = t3lib_BEfunc::getRecord($table, $id);
 
                        // Record asked to be deleted was found:
                if (is_array($recordToDelete)) {
                        $recordWasDeleted = FALSE;
 
-                       if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'])) {
-                               foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'] as $classRef) {
+                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'])) {
+                               foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'] as $classRef) {
                                        $hookObj = t3lib_div::getUserObj($classRef);
                                        if (method_exists($hookObj, 'processCmdmap_deleteAction')) {
                                                $hookObj->processCmdmap_deleteAction($table, $id, $recordToDelete, $recordWasDeleted, $this);
@@ -5493,14 +5488,12 @@ class t3lib_TCEmain {
         * @return      array           Returns a list of the tables that are 'present' on the page but not allowed with the page_uid/doktype
         */
        function doesPageHaveUnallowedTables($page_uid, $doktype) {
-               global $PAGES_TYPES;
-
                $page_uid = intval($page_uid);
                if (!$page_uid) {
                        return FALSE; // Not a number. Probably a new page
                }
 
-               $allowedTableList = isset($PAGES_TYPES[$doktype]['allowedTables']) ? $PAGES_TYPES[$doktype]['allowedTables'] : $PAGES_TYPES['default']['allowedTables'];
+               $allowedTableList = isset($GLOBALS['PAGES_TYPES'][$doktype]['allowedTables']) ? $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables'] : $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
                $allowedArray = t3lib_div::trimExplode(',', $allowedTableList, 1);
                if (strstr($allowedTableList, '*')) { // If all tables is OK the return TRUE
                        return FALSE; // OK...
@@ -6762,7 +6755,7 @@ class t3lib_TCEmain {
         * (an integer).
         *
         * Can call a list of post processing functions as defined in
-        * $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']
+        * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']
         * (numeric array with values being the function references, called by
         * t3lib_div::callUserFunction()).
         *
@@ -6782,8 +6775,6 @@ class t3lib_TCEmain {
         * @return      void
         */
        public function clear_cacheCmd($cacheCmd) {
-               global $TYPO3_CONF_VARS;
-
                $this->BE_USER->writelog(3, 1, 0, 0, 'User %s has cleared the cache (cacheCmd=%s)', array($this->BE_USER->user['username'], $cacheCmd));
 
                        // Clear cache for either ALL pages or ALL tables!
@@ -6806,8 +6797,8 @@ class t3lib_TCEmain {
                                        }
 
                                                // Clearing additional cache tables:
-                                       if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables'])) {
-                                               foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables'] as $tableName) {
+                                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables'])) {
+                                               foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables'] as $tableName) {
                                                        if (!preg_match('/[^[:alnum:]_]/', $tableName) && substr($tableName, -5) == 'cache') {
                                                                $GLOBALS['TYPO3_DB']->exec_TRUNCATEquery($tableName);
                                                        } else {
@@ -6819,12 +6810,12 @@ class t3lib_TCEmain {
                                                }
                                        }
                                }
-                               if ($this->admin && $TYPO3_CONF_VARS['EXT']['extCache']) {
+                               if ($this->admin && $GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache']) {
                                        $this->removeCacheFiles();
                                }
                        break;
                        case 'temp_CACHED':
-                               if ($this->admin && $TYPO3_CONF_VARS['EXT']['extCache']) {
+                               if ($this->admin && $GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache']) {
                                        $this->removeCacheFiles();
                                }
                        break;
@@ -6837,8 +6828,8 @@ class t3lib_TCEmain {
                                $list_cache = array($cacheCmd);
 
                                        // Call pre-processing function for clearing of cache for page ids:
-                               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'])) {
-                                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'] as $funcName) {
+                               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'])) {
+                                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'] as $funcName) {
                                                $_params = array('pageIdArray' => &$list_cache, 'cacheCmd' => $cacheCmd, 'functionID' => 'clear_cacheCmd()');
                                                        // Returns the array of ids to clear, FALSE if nothing should be cleared! Never an empty array!
                                                t3lib_div::callUserFunction($funcName, $_params, $this);
@@ -6864,9 +6855,9 @@ class t3lib_TCEmain {
                }
 
                        // Call post processing function for clear-cache:
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'])) {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'])) {
                        $_params = array('cacheCmd' => $cacheCmd);
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] as $_funcRef) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] as $_funcRef) {
                                t3lib_div::callUserFunction($_funcRef, $_params, $this);
                        }
                }
@@ -7187,4 +7178,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tcemain.php']);
 }
 
-?>
\ No newline at end of file
+?>
index d503622..bb53d58 100644 (file)
@@ -256,20 +256,19 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
         * @see typo3/init.php, t3lib_beuserauth::backendCheckLogin()
         */
        public function checkBackendAccessSettingsFromInitPhp() {
-               global $TYPO3_CONF_VARS;
 
                        // **********************
                        // Check Hardcoded lock on BE:
                        // **********************
-               if ($TYPO3_CONF_VARS['BE']['adminOnly'] < 0) {
+               if ($GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] < 0) {
                        return FALSE;
                }
 
                        // **********************
                        // Check IP
                        // **********************
-               if (trim($TYPO3_CONF_VARS['BE']['IPmaskList'])) {
-                       if (!t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $TYPO3_CONF_VARS['BE']['IPmaskList'])) {
+               if (trim($GLOBALS['TYPO3_CONF_VARS']['BE']['IPmaskList'])) {
+                       if (!t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['BE']['IPmaskList'])) {
                                return FALSE;
                        }
                }
@@ -278,7 +277,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                        // **********************
                        // Check SSL (https)
                        // **********************
-               if (intval($TYPO3_CONF_VARS['BE']['lockSSL']) && $TYPO3_CONF_VARS['BE']['lockSSL'] != 3) {
+               if (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL']) && $GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL'] != 3) {
                        if (!t3lib_div::getIndpEnv('TYPO3_SSL')) {
                                return FALSE;
                        }
@@ -370,16 +369,15 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
         * Returns the label for key, $key. If a translation for the language set in $this->uc['lang'] is found that is returned, otherwise the default value.
         * IF the global variable $LOCAL_LANG is NOT an array (yet) then this function loads the global $LOCAL_LANG array with the content of "sysext/lang/locallang_tsfe.php" so that the values therein can be used for labels in the Admin Panel
         *
-        * @param       string          Key for a label in the $LOCAL_LANG array of "sysext/lang/locallang_tsfe.php"
+        * @param       string          Key for a label in the $GLOBALS['LOCAL_LANG'] array of "sysext/lang/locallang_tsfe.php"
         * @return      string          The value for the $key
         */
        public function extGetLL($key) {
-               global $LOCAL_LANG;
-               if (!is_array($LOCAL_LANG)) {
+               if (!is_array($GLOBALS['LOCAL_LANG'])) {
                        $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_tsfe.php');
                        #include('./'.TYPO3_mainDir.'sysext/lang/locallang_tsfe.php');
-                       if (!is_array($LOCAL_LANG)) {
-                               $LOCAL_LANG = array();
+                       if (!is_array($GLOBALS['LOCAL_LANG'])) {
+                               $GLOBALS['LOCAL_LANG'] = array();
                        }
                }
 
@@ -402,4 +400,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tsfebeuserauth.php']);
 }
 
-?>
\ No newline at end of file
+?>
index 2292af7..88ec14b 100644 (file)
@@ -181,8 +181,6 @@ class t3lib_TSparser {
         * @return      string          Returns the string of the condition found, the exit signal or possible nothing (if it completed parsing with no interruptions)
         */
        function parseSub(&$setup) {
-               global $TYPO3_CONF_VARS;
-
                while (isset($this->raw[$this->rawP])) {
                        $line = ltrim($this->raw[$this->rawP]);
                        $lineP = $this->rawP;
@@ -297,8 +295,8 @@ class t3lib_TSparser {
                                                                                        }
                                                                                break;
                                                                                default:
-                                                                                       if (isset($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tsparser.php']['preParseFunc'][$tsFunc])) {
-                                                                                               $hookMethod = $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tsparser.php']['preParseFunc'][$tsFunc];
+                                                                                       if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsparser.php']['preParseFunc'][$tsFunc])) {
+                                                                                               $hookMethod = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsparser.php']['preParseFunc'][$tsFunc];
                                                                                                $params = array('currentValue' => $currentValue, 'functionArgument' => $tsFuncArg);
                                                                                                $fakeThis = FALSE;
                                                                                                $newValue = t3lib_div::callUserFunction($hookMethod, $params, $fakeThis);
index b62dbcf..b1cd1d9 100644 (file)
@@ -184,7 +184,6 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext {
         * @return      [type]          ...
         */
        function ext_displayExample() {
-               global $SOBE, $tmpl;
                if ($this->helpConfig["imagetag"] || $this->helpConfig["description"] || $this->helpConfig["header"]) {
                        $out = '<div align="center">' . $this->helpConfig["imagetag"] . '</div><BR>' .
                                   ($this->helpConfig["description"] ? implode(explode("//", $this->helpConfig["description"]), "<BR>") . "<BR>" : "") .
index bce97c8..5ddb183 100644 (file)
@@ -675,10 +675,9 @@ class t3lib_TStemplate {
         * @see includeStaticTypoScriptSources()
         */
        function addExtensionStatics($idList, $templateID, $pid, $row) {
-               global $TYPO3_LOADED_EXT;
 
                if ($row['static_file_mode'] == 1 || ($row['static_file_mode'] == 0 && substr($templateID, 0, 4) == 'sys_' && $row['root'])) {
-                       foreach ($TYPO3_LOADED_EXT as $extKey => $files) {
+                       foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $extKey => $files) {
                                if (is_array($files) && ($files['ext_typoscript_constants.txt'] || $files['ext_typoscript_setup.txt'] || $files['ext_typoscript_editorcfg.txt'])) {
                                        $mExtKey = str_replace('_', '', $extKey);
                                        $subrow = array(
@@ -1359,7 +1358,6 @@ class t3lib_TStemplate {
         * @see tslib_frameset::frameParams(), tslib_cObj::typoLink(), tslib_cObj::SEARCHRESULT(), TSpagegen::pagegenInit(), tslib_menu::link()
         */
        function linkData($page, $oTarget, $no_cache, $script, $overrideArray = '', $addParams = '', $typeOverride = '', $targetDomain = '') {
-               global $TYPO3_CONF_VARS;
 
                $LD = array();
 
@@ -1434,13 +1432,13 @@ class t3lib_TStemplate {
                $LD['totalURL'] = $this->removeQueryString($LD['url'] . $LD['type'] . $LD['no_cache'] . $LD['linkVars'] . $GLOBALS['TSFE']->getMethodUrlIdToken) . $LD['sectionIndex'];
 
                        // Call post processing function for link rendering:
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'])) {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'])) {
                        $_params = array(
                                'LD' => &$LD,
                                'args' => array('page' => $page, 'oTarget' => $oTarget, 'no_cache' => $no_cache, 'script' => $script, 'overrideArray' => $overrideArray, 'addParams' => $addParams, 'typeOverride' => $typeOverride, 'targetDomain' => $targetDomain),
                                'typeNum' => $typeNum
                        );
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'] as $_funcRef) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'] as $_funcRef) {
                                t3lib_div::callUserFunction($_funcRef, $_params, $this);
                        }
                }
@@ -1577,4 +1575,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tstemplate.php']);
 }
 
-?>
\ No newline at end of file
+?>
index 4fa3301..2e86ec3 100644 (file)
@@ -137,7 +137,7 @@ abstract class t3lib_userAuth {
        var $hash_length = 32; // The ident-hash is normally 32 characters and should be! But if you are making sites for WAP-devices og other lowbandwidth stuff, you may shorten the length. Never let this value drop below 6. A length of 6 would give you more than 16 mio possibilities.
        var $getMethodEnabled = FALSE; // Setting this flag TRUE lets user-authetication happen from GET_VARS if POST_VARS are not set. Thus you may supply username/password from the URL.
        var $lockIP = 4; // If set, will lock the session to the users IP address (all four numbers. Reducing to 1-3 means that only first, second or third part of the IP address is used).
-       var $lockHashKeyWords = 'useragent'; // Keyword list (commalist with no spaces!): "useragent". Each keyword indicates some information that can be included in a integer hash made to lock down usersessions. Configurable through $TYPO3_CONF_VARS[TYPO3_MODE]['lockHashKeyWords']
+       var $lockHashKeyWords = 'useragent'; // Keyword list (commalist with no spaces!): "useragent". Each keyword indicates some information that can be included in a integer hash made to lock down usersessions. Configurable through $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['lockHashKeyWords']
 
        var $warningEmail = ''; // warning -emailaddress:
        var $warningPeriod = 3600; // Period back in time (in seconds) in which number of failed logins are collected
@@ -160,7 +160,7 @@ abstract class t3lib_userAuth {
        var $challengeStoredInCookie = FALSE; // If set, the challenge value will be stored in a session as well so the server can check that is was not forged.
        var $loginType = ''; // Login type, used for services.
 
-       var $svConfig = array(); // "auth" services configuration array from $TYPO3_CONF_VARS['SVCONF']['auth']
+       var $svConfig = array(); // "auth" services configuration array from $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']
        var $writeDevLog = FALSE; // write messages into the devlog?
 
 
@@ -176,8 +176,6 @@ abstract class t3lib_userAuth {
         * @return      void
         */
        function start() {
-               global $TYPO3_CONF_VARS;
-
                        // backend or frontend login - used for auth services
                if (empty($this->loginType)) {
                        throw new t3lib_exception('No loginType defined, should be set explicitly by subclass');
@@ -186,17 +184,17 @@ abstract class t3lib_userAuth {
                        // set level to normal if not already set
                if (!$this->security_level) {
                                // Notice: cannot use TYPO3_MODE here because BE user can be logged in and operate inside FE!
-                       $this->security_level = trim($TYPO3_CONF_VARS[$this->loginType]['loginSecurityLevel']);
+                       $this->security_level = trim($GLOBALS['TYPO3_CONF_VARS'][$this->loginType]['loginSecurityLevel']);
                        if (!$this->security_level) {
                                $this->security_level = 'normal';
                        }
                }
 
                        // enable dev logging if set
-               if ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['writeDevLog']) {
+               if ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['writeDevLog']) {
                        $this->writeDevLog = TRUE;
                }
-               if ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['writeDevLog' . $this->loginType]) {
+               if ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['writeDevLog' . $this->loginType]) {
                        $this->writeDevLog = TRUE;
                }
                if (TYPO3_DLOG) {
@@ -212,7 +210,7 @@ abstract class t3lib_userAuth {
                $this->newSessionID = FALSE;
                        // $id is set to ses_id if cookie is present. Else set to FALSE, which will start a new session
                $id = $this->getCookie($this->name);
-               $this->svConfig = $TYPO3_CONF_VARS['SVCONF']['auth'];
+               $this->svConfig = $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth'];
 
                        // if we have a flash client, take the ID from the GP
                if (!$id && $GLOBALS['CLIENT']['BROWSER'] == 'flash') {
@@ -246,7 +244,7 @@ abstract class t3lib_userAuth {
                }
 
                        // Set session hashKey lock keywords from configuration; currently only 'useragent' can be used.
-               $this->lockHashKeyWords = $TYPO3_CONF_VARS[$this->loginType]['lockHashKeyWords'];
+               $this->lockHashKeyWords = $GLOBALS['TYPO3_CONF_VARS'][$this->loginType]['lockHashKeyWords'];
 
                        // Make certain that NO user is set initially
                $this->user = '';
@@ -282,8 +280,8 @@ abstract class t3lib_userAuth {
                }
 
                        // Hook for alternative ways of filling the $this->user array (is used by the "timtaw" extension)
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postUserLookUp'])) {
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postUserLookUp'] as $funcName) {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postUserLookUp'])) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postUserLookUp'] as $funcName) {
                                $_params = array(
                                        'pObj' => &$this,
                                );
@@ -361,7 +359,7 @@ abstract class t3lib_userAuth {
 
        /**
         * Gets the domain to be used on setting cookies.
-        * The information is taken from the value in $TYPO3_CONF_VARS[SYS][cookieDomain].
+        * The information is taken from the value in $GLOBALS['TYPO3_CONF_VARS']['SYS']['cookieDomain'].
         *
         * @return      string          The domain to be used on setting cookies
         */
@@ -1212,9 +1210,7 @@ abstract class t3lib_userAuth {
         * @internal
         */
        function processLoginData($loginData, $security_level = '') {
-               global $TYPO3_CONF_VARS;
-
-               $loginSecurityLevel = $security_level ? $security_level : ($TYPO3_CONF_VARS[$this->loginType]['loginSecurityLevel'] ? $TYPO3_CONF_VARS[$this->loginType]['loginSecurityLevel'] : $this->security_level);
+               $loginSecurityLevel = $security_level ? $security_level : ($GLOBALS['TYPO3_CONF_VARS'][$this->loginType]['loginSecurityLevel'] ? $GLOBALS['TYPO3_CONF_VARS'][$this->loginType]['loginSecurityLevel'] : $this->security_level);
 
                        // Processing data according to the state it was submitted in.
                        // ($loginSecurityLevel should reflect the security level used on the data being submitted in the login form)
@@ -1467,4 +1463,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_userauth.php']);
 }
 
-?>
\ No newline at end of file
+?>
index b81dffc..b0cb56e 100644 (file)
@@ -306,7 +306,6 @@ abstract class t3lib_userAuthGroup extends t3lib_userAuth {
         * @return      string          Part of where clause. Prefix " AND " to this.
         */
        function getPagePermsClause($perms) {
-               global $TYPO3_CONF_VARS;
                if (is_array($this->user)) {
                        if ($this->isAdmin()) {
                                return ' 1=1';
@@ -324,9 +323,9 @@ abstract class t3lib_userAuthGroup extends t3lib_userAuth {
                                // ****************
                                // getPagePermsClause-HOOK
                                // ****************
-                       if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getPagePermsClause'])) {
+                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getPagePermsClause'])) {
 
-                               foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getPagePermsClause'] as $_funcRef) {
+                               foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getPagePermsClause'] as $_funcRef) {
                                        $_params = array('currentClause' => $str, 'perms' => $perms);
                                        $str = t3lib_div::callUserFunction($_funcRef, $_params, $this);
                                }
@@ -347,7 +346,6 @@ abstract class t3lib_userAuthGroup extends t3lib_userAuth {
         * @return      integer         Bitwise representation of the users permissions in relation to input page row, $row
         */
        function calcPerms($row) {
-               global $TYPO3_CONF_VARS;
                if ($this->isAdmin()) {
                        return 31;
                } // Return 31 for admin users.
@@ -366,8 +364,8 @@ abstract class t3lib_userAuthGroup extends t3lib_userAuth {
                        // ****************
                        // CALCPERMS hook
                        // ****************
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['calcPerms'])) {
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['calcPerms'] as $_funcRef) {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['calcPerms'])) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['calcPerms'] as $_funcRef) {
                                $_params = array(
                                        'row' => $row,
                                        'outputPermissions' => $out
@@ -387,8 +385,6 @@ abstract class t3lib_userAuthGroup extends t3lib_userAuth {
         * @return      boolean
         */
        function isRTE() {
-               global $CLIENT;
-
                        // Start:
                $this->RTE_errors = array();
                if (!$this->uc['edit_RTE']) {
@@ -1346,8 +1342,6 @@ abstract class t3lib_userAuthGroup extends t3lib_userAuth {
         * @access private
         */
        function fetchGroups($grList, $idList = '') {
-               global $TYPO3_CONF_VARS;
-
                        // Fetching records of the groups in $grList (which are not blocked by lockedToDomain either):
                $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\'' . t3lib_div::getIndpEnv('HTTP_HOST') . '\')';
                $whereSQL = 'deleted=0 AND hidden=0 AND pid=0 AND uid IN (' . $grList . ')' . $lockToDomain_SQL;
@@ -1434,8 +1428,8 @@ abstract class t3lib_userAuthGroup extends t3lib_userAuth {
                        // ****************
                        // HOOK: fetchGroups_postProcessing
                        // ****************
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroups_postProcessing'])) {
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroups_postProcessing'] as $_funcRef) {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroups_postProcessing'])) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroups_postProcessing'] as $_funcRef) {
                                $_params = array();
                                t3lib_div::callUserFunction($_funcRef, $_params, $this);
                        }
@@ -1922,4 +1916,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_userauthgroup.php']);
 }
 
-?>
\ No newline at end of file
+?>
index f7ff05c..14af4c9 100644 (file)
@@ -86,8 +86,12 @@ require_once(PATH_t3lib.'class.t3lib_div.php');
 require_once(PATH_t3lib.'class.t3lib_extmgm.php');
 
 require(PATH_t3lib.'config_default.php');
-if (!defined ('TYPO3_db'))     die ('The configuration file was not included.');
-if (!$TYPO3_CONF_VARS['GFX']['image_processing'])      die ('ImageProcessing was disabled!');
+if (!defined ('TYPO3_db')) {
+       die ('The configuration file was not included.');
+}
+if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['image_processing']) {
+       die ('ImageProcessing was disabled!');
+}
 
 
 
@@ -124,7 +128,7 @@ class SC_t3lib_thumbs {
        var $output = '';
        var $sizeDefault='56x56';
 
-       var $imageList;         // Coming from $TYPO3_CONF_VARS['GFX']['imagefile_ext']
+       var $imageList;         // Coming from $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
        var $input;             // Contains the absolute path to the file for which to make a thumbnail (after init())
 
                // Internal, static: GPvar:
@@ -139,40 +143,38 @@ class SC_t3lib_thumbs {
         *
         * @return      void
         */
-       function init() {
-               global $TYPO3_CONF_VARS;
-
+       function init() {
                        // Setting GPvars:
                $file = t3lib_div::_GP('file');
                $size = t3lib_div::_GP('size');
                $md5sum = t3lib_div::_GP('md5sum');
 
                        // Image extension list is set:
-               $this->imageList = $TYPO3_CONF_VARS['GFX']['imagefile_ext'];                    // valid extensions. OBS: No spaces in the list, all lowercase...
+               $this->imageList = $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'];                 // valid extensions. OBS: No spaces in the list, all lowercase...
 
                        // If the filereference $this->file is relative, we correct the path
-               if (substr($file,0,3)=='../')   {
+               if (substr($file,0,3)=='../') {
                        $file = PATH_site.substr($file,3);
                }
 
                        // Now the path is absolute.
                        // Checking for backpath and double slashes + the thumbnail can be made from files which are in the PATH_site OR the lockRootPath only!
-               if (t3lib_div::isAllowedAbsPath($file)) {
+               if (t3lib_div::isAllowedAbsPath($file)) {
                        $mtime = filemtime($file);
                }
 
                        // Do an MD5 check to prevent viewing of images without permission
                $OK = FALSE;
-               if ($mtime)     {
+               if ($mtime) {
                                // Always use the absolute path for this check!
                        $check = basename($file).':'.$mtime.':'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
                        $md5_real = t3lib_div::shortMD5($check);
-                       if (!strcmp($md5_real,$md5sum)) {
+                       if (!strcmp($md5_real,$md5sum)) {
                                $OK = TRUE;
                        }
                }
 
-               if ($OK)        {
+               if ($OK) {
                        $this->input = $file;
                        $this->size = $size;
                        $this->mtime = $mtime;
@@ -190,69 +192,67 @@ class SC_t3lib_thumbs {
         *
         * @return      void
         */
-       function main() {
-               global $TYPO3_CONF_VARS;
-
+       function main() {
                        // If file exists, we make a thumbsnail of the file.
-               if ($this->input && file_exists($this->input))  {
+               if ($this->input && file_exists($this->input)) {
 
                                // Check file extension:
                        $reg = array();
-                       if (preg_match('/(.*)\.([^\.]*$)/',$this->input,$reg))  {
+                       if (preg_match('/(.*)\.([^\.]*$)/', $this->input, $reg)) {
                                $ext=strtolower($reg[2]);
-                               $ext=($ext=='jpeg')?'jpg':$ext;
-                               if ($ext=='ttf')        {
+                               $ext=($ext=='jpeg') ? 'jpg' : $ext;
+                               if ($ext=='ttf') {
                                        $this->fontGif($this->input);   // Make font preview... (will not return)
-                               } elseif (!t3lib_div::inList($this->imageList, $ext))   {
-                                       $this->errorGif('Not imagefile!',$ext,basename($this->input));
+                               } elseif (!t3lib_div::inList($this->imageList, $ext)) {
+                                       $this->errorGif('Not imagefile!', $ext, basename($this->input));
                                }
                        } else {
-                               $this->errorGif('Not imagefile!','No ext!',basename($this->input));
+                               $this->errorGif('Not imagefile!', 'No ext!', basename($this->input));
                        }
 
                                // ... so we passed the extension test meaning that we are going to make a thumbnail here:
                        if (!$this->size)       $this->size = $this->sizeDefault;       // default
 
                                // I added extra check, so that the size input option could not be fooled to pass other values. That means the value is exploded, evaluated to an integer and the imploded to [value]x[value]. Furthermore you can specify: size=340 and it'll be translated to 340x340.
-                       $sizeParts = explode('x', $this->size.'x'.$this->size); // explodes the input size (and if no "x" is found this will add size again so it is the same for both dimensions)
-                       $sizeParts = array(t3lib_div::intInRange($sizeParts[0],1,1000),t3lib_div::intInRange($sizeParts[1],1,1000));    // Cleaning it up, only two parameters now.
-                       $this->size = implode('x',$sizeParts);          // Imploding the cleaned size-value back to the internal variable
+                       $sizeParts = explode('x', $this->size . 'x' . $this->size);     // explodes the input size (and if no "x" is found this will add size again so it is the same for both dimensions)
+                       $sizeParts = array(t3lib_div::intInRange($sizeParts[0], 1, 1000), t3lib_div::intInRange($sizeParts[1], 1, 1000));       // Cleaning it up, only two parameters now.
+                       $this->size = implode('x', $sizeParts);         // Imploding the cleaned size-value back to the internal variable
                        $sizeMax = max($sizeParts);     // Getting max value
 
                                // Init
-                       $outpath = PATH_site.$this->outdir;
+                       $outpath = PATH_site . $this->outdir;
 
                                // Should be - ? 'png' : 'gif' - , but doesn't work (ImageMagick prob.?)
                                // René: png work for me
-                       $thmMode = t3lib_div::intInRange($TYPO3_CONF_VARS['GFX']['thumbnails_png'],0);
+                       $thmMode = t3lib_div::intInRange($GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails_png'], 0);
                        $outext = ($ext!='jpg' || ($thmMode & 2)) ? ($thmMode & 1 ? 'png' : 'gif') : 'jpg';
 
-                       $outfile = 'tmb_'.substr(md5($this->input.$this->mtime.$this->size),0,10).'.'.$outext;
-                       $this->output = $outpath.$outfile;
+                       $outfile = 'tmb_' . substr(md5($this->input . $this->mtime . $this->size), 0, 10) . '.' . $outext;
+                       $this->output = $outpath . $outfile;
 
-                       if ($TYPO3_CONF_VARS['GFX']['im'])      {
+                       if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im']) {
                                        // If thumbnail does not exist, we generate it
-                               if (!file_exists($this->output))        {
+                               if (!file_exists($this->output)) {
                                        $parameters = '-sample ' . $this->size . ' ' . $this->wrapFileName($this->input) . '[0] ' . $this->wrapFileName($this->output);
                                        $cmd = t3lib_div::imageMagickCommand('convert', $parameters);
                                        t3lib_utility_Command::exec($cmd);
-                                       if (!file_exists($this->output))        {
-                                               $this->errorGif('No thumb','generated!',basename($this->input));
+                                       if (!file_exists($this->output)) {
+                                               $this->errorGif('No thumb','generated!', basename($this->input));
                                        } else {
                                                t3lib_div::fixPermissions($this->output);
                                        }
                                }
                                        // The thumbnail is read and output to the browser
-                               if($fd = @fopen($this->output,'rb'))    {
-                                       header('Content-type: image/'.$outext);
+                               if($fd = @fopen($this->output,'rb')) {
+                                       header('Content-type: image/' . $outext);
                                        fpassthru($fd);
                                        fclose($fd);
                                } else {
-                                       $this->errorGif('Read problem!','',$this->output);
+                                       $this->errorGif('Read problem!', '', $this->output);
                                }
                        } else exit;
                } else {
-                       $this->errorGif('No valid','inputfile!',basename($this->input));
+                       $this->errorGif('No valid','inputfile!', basename($this->input));
                }
        }
 
@@ -282,10 +282,8 @@ class SC_t3lib_thumbs {
         * @param       string          Text line 3
         * @return      void
         */
-       function errorGif($l1,$l2,$l3)  {
-               global $TYPO3_CONF_VARS;
-
-               if (!$TYPO3_CONF_VARS['GFX']['gdlib']) {
+       function errorGif($l1,$l2,$l3) {
+               if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']) {
                        throw new RuntimeException(
                                'TYPO3 Fatal Error: No gdlib. ' . $l1 . ' ' . $l2 . ' ' . $l3,
                                1270853952
@@ -293,35 +291,35 @@ class SC_t3lib_thumbs {
                }
 
                        // Creates the basis for the error image
-               if ($TYPO3_CONF_VARS['GFX']['gdlib_png'])       {
+               if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']) {
                        header('Content-type: image/png');
-                       $im = imagecreatefrompng(PATH_typo3.'gfx/notfound_thumb.png');
+                       $im = imagecreatefrompng(PATH_typo3 . 'gfx/notfound_thumb.png');
                } else {
                        header('Content-type: image/gif');
-                       $im = imagecreatefromgif(PATH_typo3.'gfx/notfound_thumb.gif');
+                       $im = imagecreatefromgif(PATH_typo3 . 'gfx/notfound_thumb.gif');
                }
                        // Sets background color and print color.
-               $white = imageColorAllocate($im, 0,0,0);
-               $black = imageColorAllocate($im, 255,255,0);
+               $white = imageColorAllocate($im, 0, 0, 0);
+               $black = imageColorAllocate($im, 255, 255, 0);
 
                        // Prints the text strings with the build-in font functions of GD
                $x=0;
                $font=0;
-               if ($l1)        {
+               if ($l1) {
                        imagefilledrectangle($im, $x, 9, 56, 16, $black);
                        imageString($im,$font,$x,9,$l1,$white);
                }
-               if ($l2)        {
+               if ($l2) {
                        imagefilledrectangle($im, $x, 19, 56, 26, $black);
                        imageString($im,$font,$x,19,$l2,$white);
                }
-               if ($l3)        {
+               if ($l3) {
                        imagefilledrectangle($im, $x, 29, 56, 36, $black);
                        imageString($im,$font,$x,29,substr($l3,-14),$white);
                }
 
                        // Outputting the image stream and exit
-               if ($TYPO3_CONF_VARS['GFX']['gdlib_png'])       {
+               if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']) {
                        imagePng($im);
                } else {
                        imageGif($im);
@@ -339,10 +337,8 @@ class SC_t3lib_thumbs {
         * @param       string          The filepath to the font file (absolute, probably)
         * @return      void
         */
-       function fontGif($font) {
-               global $TYPO3_CONF_VARS;
-
-               if (!$TYPO3_CONF_VARS['GFX']['gdlib']) {
+       function fontGif($font) {
+               if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']) {
                        throw new RuntimeException(
                                'TYPO3 Fatal Error: No gdlib.',
                                1270853953
@@ -350,9 +346,9 @@ class SC_t3lib_thumbs {
                }
 
                        // Create image and set background color to white.
-               $im = imageCreate(250,76);
-               $white = imageColorAllocate($im, 255,255,255);
-               $col = imageColorAllocate($im, 0,0,0);
+               $im = imageCreate(250, 76);
+               $white = imageColorAllocate($im, 255, 255, 255);
+               $col = imageColorAllocate($im, 0, 0, 0);
 
                        // The test string and offset in x-axis.
                $string = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÆæØøÅåÄäÖöÜüß';
@@ -372,8 +368,8 @@ class SC_t3lib_thumbs {
                imagettftext ($im, t3lib_div::freetypeDpiComp(18), 0, $x, 53, $col, $font, $string);
                imagettftext ($im, t3lib_div::freetypeDpiComp(24), 0, $x, 74, $col, $font, $string);
 
-                       // Output PNG or GIF based on $TYPO3_CONF_VARS['GFX']['gdlib_png']
-               if ($TYPO3_CONF_VARS['GFX']['gdlib_png'])       {
+                       // Output PNG or GIF based on $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']
+               if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']) {
                        header('Content-type: image/png');
                        imagePng($im);
                } else {
index 05daf80..04bcc93 100644 (file)
@@ -1437,8 +1437,6 @@ class clickMenu {
         * @return      array           $menuItem entry with 6 numerical entries: [0] is the HTML for display of the element with link and icon an mouseover etc., [1]-[5] is simply the input params passed through!
         */
        function linkItem($str,$icon,$onClick,$onlyCM=0,$dontHide=0)    {
-               global $BACK_PATH;
-
                $this->elCount++;
                if($this->ajax) {
                        $onClick = str_replace('top.loadTopMenu', 'showClickmenu_raw', $onClick);
index 3de031e..db201e4 100644 (file)
@@ -254,8 +254,6 @@ class SC_alt_doc {
         * @return      void
         */
        function processData()  {
-               global $TYPO3_CONF_VARS;
-
                        // GPvars specifically for processing:
                $this->data = t3lib_div::_GP('data');
                $this->cmd = t3lib_div::_GP('cmd');
@@ -307,7 +305,7 @@ class SC_alt_doc {
                        // Checking referer / executing
                $refInfo=parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
                $httpHost = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');
-               if ($httpHost != $refInfo['host'] && $this->vC != $GLOBALS['BE_USER']->veriCode() && !$TYPO3_CONF_VARS['SYS']['doNotCheckReferer']) {
+               if ($httpHost != $refInfo['host'] && $this->vC != $GLOBALS['BE_USER']->veriCode() && !$GLOBALS['TYPO3_CONF_VARS']['SYS']['doNotCheckReferer']) {
                        $tce->log('',0,0,0,1,"Referer host '%s' and server host '%s' did not match and veriCode was not valid either!",1,array($refInfo['host'],$httpHost));
                        debug('Error: Referer host did not match with server host.');
                } else {
index d9fcfd2..7bef001 100644 (file)
@@ -87,13 +87,11 @@ class SC_alt_doc_nodoc {
         * @return      void
         */
        function init() {
-               global $BACK_PATH;
-
                        // Start the template object:
                $this->doc = t3lib_div::makeInstance('mediumDoc');
                $this->doc->bodyTagMargins['x']=5;
                $this->doc->bodyTagMargins['y']=5;
-               $this->doc->backPath = $BACK_PATH;
+               $this->doc->backPath = $GLOBALS['BACK_PATH'];
 
                        // Add JS
                $this->doc->JScode = $this->doc->wrapScriptTags('
index 5e88fa5..d498725 100644 (file)
@@ -85,12 +85,10 @@ class SC_alt_intro {
         * @return      void
         */
        function init() {
-               global $TBE_MODULES;
-
                        // Loads the available backend modules so we can create the description overview.
                $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
                $this->loadModules->observeWorkspaces = TRUE;
-               $this->loadModules->load($TBE_MODULES);
+               $this->loadModules->load($GLOBALS['TBE_MODULES']);
        }
 
        /**
@@ -99,11 +97,9 @@ class SC_alt_intro {
         * @return      void
         */
        function main() {
-               global $TBE_TEMPLATE;
-
                $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
 
-               $TBE_TEMPLATE->divClass = $GLOBALS['TBE_TEMPLATE']->bodyTagId;
+               $GLOBALS['TBE_TEMPLATE']->divClass = $GLOBALS['TBE_TEMPLATE']->bodyTagId;
 
                $this->content = '
                        <div id="typo3-docheader">
@@ -130,7 +126,7 @@ class SC_alt_intro {
                $this->content .= '<br /></div>';
 
                        // Renders the module page
-               $this->content = $TBE_TEMPLATE->render(
+               $this->content = $GLOBALS['TBE_TEMPLATE']->render(
                        'About modules',
                        $this->content
                );
index a3bd085..bbe134d 100644 (file)
@@ -95,20 +95,18 @@ class SC_alt_menu {
         * @return      void
         */
        function init() {
-               global $TBE_MODULES, $TBE_TEMPLATE;
-
                        // Setting GPvars:
                $this->_clearCacheFiles = t3lib_div::_GP('_clearCacheFiles');
 
                        // Loads the backend modules available for the logged in user.
                $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
                $this->loadModules->observeWorkspaces = TRUE;
-               $this->loadModules->load($TBE_MODULES);
+               $this->loadModules->load($GLOBALS['TBE_MODULES']);
 
                        // Instantiates the menu object which will generate some JavaScript for the goToModule() JS function in this frame.
                $this->alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
 
-               $TBE_TEMPLATE->JScodeArray[] = $this->alt_menuObj->generateMenuJScode($this->loadModules->modules);
+               $GLOBALS['TBE_TEMPLATE']->JScodeArray[] = $this->alt_menuObj->generateMenuJScode($this->loadModules->modules);
        }
 
        /**
index b6ce4f3..ee646f1 100644 (file)
@@ -78,27 +78,25 @@ class SC_alt_menu_sel {
         * @return      void
         */
        function main() {
-               global $TBE_MODULES,$TBE_TEMPLATE;
-
                        // Initialize modules
                $loadModules = t3lib_div::makeInstance('t3lib_loadModules');
                $loadModules->observeWorkspaces = TRUE;
-               $loadModules->load($TBE_MODULES);
+               $loadModules->load($GLOBALS['TBE_MODULES']);
 
                        // Start page
-               $TBE_TEMPLATE->form = '<form action="">';
+               $GLOBALS['TBE_TEMPLATE']->form = '<form action="">';
 
                        // add menu JS
                $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
-               $TBE_TEMPLATE->JScodeArray[] = $alt_menuObj->generateMenuJScode($loadModules->modules);
+               $GLOBALS['TBE_TEMPLATE']->JScodeArray[] = $alt_menuObj->generateMenuJScode($loadModules->modules);
 
-               $this->content.=$TBE_TEMPLATE->startPage('Selector box menu');
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->startPage('Selector box menu');
 
                        // Make menu and add it:
                $this->content.=$alt_menuObj->topMenu($loadModules->modules,0,'',2);
 
                        // End page:
-               $this->content.=$TBE_TEMPLATE->endPage();
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->endPage();
        }
 
        /**
index 09a92bc..c0289b5 100644 (file)
@@ -132,8 +132,6 @@ class SC_alt_shortcut {
         * @return      void
         */
        function preinit()      {
-               global $TBE_MODULES;
-
                        // Setting GPvars:
                $this->isAjaxCall             = (boolean) t3lib_div::_GP('ajax');
                $this->modName                = t3lib_div::_GP('modName');
@@ -151,7 +149,7 @@ class SC_alt_shortcut {
 
                        // Creating modules object
                $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
-               $this->loadModules->load($TBE_MODULES);
+               $this->loadModules->load($GLOBALS['TBE_MODULES']);
        }
 
        /**
@@ -243,10 +241,8 @@ class SC_alt_shortcut {
         * @return      void
         */
        function init() {
-               global $BACK_PATH;
-
                $this->doc = t3lib_div::makeInstance('template');
-               $this->doc->backPath = $BACK_PATH;
+               $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->form='<form action="alt_shortcut.php" name="shForm" method="post">';
                $this->doc->divClass='typo3-shortcut';
                $this->doc->JScode.=$this->doc->wrapScriptTags('
index 984c6d3..3f8fdbc 100644 (file)
@@ -73,17 +73,15 @@ class SC_alt_toplogo {
         * @return      void
         */
        function main() {
-               global $TBE_TEMPLATE,$TBE_STYLES;
-
                        // Start page
-               $this->content.=$TBE_TEMPLATE->startPage('Logo frame');
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->startPage('Logo frame');
 
                        // Set logo:
                $logo = t3lib_div::makeInstance('TYPO3logo');
                $this->content .= $logo->render();
 
                        // End page:
-               $this->content.=$TBE_TEMPLATE->endPage();
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->endPage();
        }
 
        /**
index d5c1f97..7936a92 100644 (file)
@@ -161,13 +161,11 @@ class SC_alt_topmenu_dummy {
         * @return      void
         */
        function dummyContent() {
-               global $TBE_TEMPLATE;
-
                        // Start page
-               $this->content.=$TBE_TEMPLATE->startPage('Top frame dummy display');
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->startPage('Top frame dummy display');
 
                        // End page:
-               $this->content.=$TBE_TEMPLATE->endPage();
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->endPage();
        }
 
        /**
index 680812c..ae6a956 100644 (file)
@@ -631,8 +631,6 @@ class alt_menu_functions {
         * @return      string  goToModule javascript function
         */
        function generateMenuJScode($loadedModules, $menuType = 4)      {
-               global $TBE_TEMPLATE;
-
                $goToModuleSwitch = $this->topMenu($loadedModules, 0, '', $menuType);
 
                $jsCode = '
index 070e939..cf865c6 100644 (file)
@@ -278,7 +278,6 @@ class localPageTree extends t3lib_browseTree {
         * @return      string          HTML output.
         */
        function printTree($treeArr='') {
-               global $BACK_PATH;
                $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
                if (!is_array($treeArr))        $treeArr=$this->tree;
 
@@ -289,7 +288,7 @@ class localPageTree extends t3lib_browseTree {
                        $c++;
                        $bgColorClass = ($c+1)%2 ? 'bgColor' : 'bgColor-10';
                        if ($GLOBALS['SOBE']->browser->curUrlInfo['act']=='page' && $GLOBALS['SOBE']->browser->curUrlInfo['pageid']==$v['row']['uid'] && $GLOBALS['SOBE']->browser->curUrlInfo['pageid'])       {
-                               $arrCol='<td><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/blinkarrow_right.gif','width="5" height="9"').' class="c-blinkArrowR" alt="" /></td>';
+                               $arrCol='<td><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/blinkarrow_right.gif','width="5" height="9"').' class="c-blinkArrowR" alt="" /></td>';
                                $bgColorClass='bgColor4';
                        } else {
                                $arrCol='<td></td>';
@@ -297,7 +296,7 @@ class localPageTree extends t3lib_browseTree {
 
                        $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->browser->act.'&mode='.$GLOBALS['SOBE']->browser->mode.'&expandPage='.$v['row']['uid'].'\');';
                        $cEbullet = $this->ext_isLinkable($v['row']['doktype'],$v['row']['uid']) ?
-                                               '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/arrowbullet.gif','width="18" height="16"').' alt="" /></a>' :
+                                               '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/arrowbullet.gif','width="18" height="16"').' alt="" /></a>' :
                                                '';
                        $out.='
                                <tr class="'.$bgColorClass.'">
@@ -515,7 +514,6 @@ class localFolderTree extends t3lib_folderTree {
         * @return      string          HTML output of the tree.
         */
        function printTree($treeArr='') {
-               global $BACK_PATH;
                $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
 
                if (!is_array($treeArr))        $treeArr=$this->tree;
@@ -539,14 +537,14 @@ class localFolderTree extends t3lib_folderTree {
 
                                // Creating blinking arrow, if applicable:
                        if (($GLOBALS['SOBE']->browser->curUrlInfo['act'] == 'file' || $GLOBALS['SOBE']->browser->curUrlInfo['act'] == 'folder') && $cmpPath == $v['row']['path']) {
-                               $arrCol='<td><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/blinkarrow_right.gif','width="5" height="9"').' class="c-blinkArrowR" alt="" /></td>';
+                               $arrCol='<td><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/blinkarrow_right.gif','width="5" height="9"').' class="c-blinkArrowR" alt="" /></td>';
                                $bgColorClass='bgColor4';
                        } else {
                                $arrCol='<td></td>';
                        }
                                // Create arrow-bullet for file listing (if folder path is linkable):
                        $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->browser->act.'&mode='.$GLOBALS['SOBE']->browser->mode.'&expandFolder='.rawurlencode($v['row']['path']).'\');';
-                       $cEbullet = $this->ext_isLinkable($v['row']) ? '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/arrowbullet.gif','width="18" height="16"').' alt="" /></a>' : '';
+                       $cEbullet = $this->ext_isLinkable($v['row']) ? '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/arrowbullet.gif','width="18" height="16"').' alt="" /></a>' : '';
 
                                // Put table row with folder together:
                        $out.='
@@ -760,8 +758,6 @@ class browse_links {
         * @return      void
         */
        function init() {
-               global $BACK_PATH;
-
                        // Main GPvars:
                $this->pointer           = t3lib_div::_GP('pointer');
                $this->bparams           = t3lib_div::_GP('bparams');
@@ -1125,7 +1121,7 @@ class browse_links {
 
                        function launchView(url)        {       //
                                var thePreviewWindow="";
-                               thePreviewWindow = window.open("'.$BACK_PATH.'show_item.php?table="+url,"ShowItem","height=300,width=410,status=0,menubar=0,resizable=0,location=0,directories=0,scrollbars=1,toolbar=0");
+                               thePreviewWindow = window.open("'.$GLOBALS['BACK_PATH'].'show_item.php?table="+url,"ShowItem","height=300,width=410,status=0,menubar=0,resizable=0,location=0,directories=0,scrollbars=1,toolbar=0");
                                if (thePreviewWindow && thePreviewWindow.focus) {
                                        thePreviewWindow.focus();
                                }
@@ -1234,8 +1230,6 @@ class browse_links {
         * @return      string          Modified content variable.
         */
        function main_rte($wiz=0)       {
-               global $BACK_PATH;
-
                        // Starting content:
                $content=$this->doc->startPage('RTE link');
 
@@ -1422,7 +1416,7 @@ class browse_links {
                                                                // Adding link to menu of user defined links:
                                                        $subcats[$k2i]='
                                                                <tr>
-                                                                       <td class="bgColor4">'.$A[0].'<strong>'.htmlspecialchars($title).($this->curUrlInfo['info']==$v[$k2i.'.']['url']?'<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/blinkarrow_right.gif','width="5" height="9"').' class="c-blinkArrowR" alt="" />':'').'</strong><br />'.$description.$A[1].'</td>
+                                                                       <td class="bgColor4">'.$A[0].'<strong>'.htmlspecialchars($title).($this->curUrlInfo['info']==$v[$k2i.'.']['url']?'<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/blinkarrow_right.gif','width="5" height="9"').' class="c-blinkArrowR" alt="" />':'').'</strong><br />'.$description.$A[1].'</td>
                                                                </tr>';
                                                }
                                        }
@@ -1842,8 +1836,6 @@ class browse_links {
         * @return      string          HTML output. Returns content only if the ->expandPage value is set (pointing to a page uid to show tt_content records from ...)
         */
        function expandPage()   {
-               global $BACK_PATH;
-
                $out='';
                $expPageId = $this->expandPage;         // Set page id (if any) to expand
 
@@ -1883,12 +1875,12 @@ class browse_links {
                                $c++;
                                $icon = t3lib_iconWorks::getSpriteIconForRecord('tt_content', $row);
                                if ($this->curUrlInfo['act']=='page' && $this->curUrlInfo['cElement']==$row['uid'])     {
-                                       $arrCol='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/blinkarrow_left.gif','width="5" height="9"').' class="c-blinkArrowL" alt="" />';
+                                       $arrCol='<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/blinkarrow_left.gif','width="5" height="9"').' class="c-blinkArrowL" alt="" />';
                                } else {
                                        $arrCol='';
                                }
                                        // Putting list element HTML together:
-                               $out.='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/join'.($c==$cc?'bottom':'').'.gif','width="18" height="16"').' alt="" />'.
+                               $out.='<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/join'.($c==$cc?'bottom':'').'.gif','width="18" height="16"').' alt="" />'.
                                                $arrCol.
                                                '<a href="#" onclick="return link_typo3Page(\''.$expPageId.'\',\'#'.$row['uid'].'\');">'.
                                                $icon.
@@ -1903,8 +1895,8 @@ class browse_links {
                                                if (($skey%3)==2)       {
                                                                // Putting list element HTML together:
                                                        $sval = substr($sval,0,100);
-                                                       $out.='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/line.gif','width="18" height="16"').' alt="" />'.
-                                                                       '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/join'.($skey+3>count($split)?'bottom':'').'.gif','width="18" height="16"').' alt="" />'.
+                                                       $out.='<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/line.gif','width="18" height="16"').' alt="" />'.
+                                                                       '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/join'.($skey+3>count($split)?'bottom':'').'.gif','width="18" height="16"').' alt="" />'.
                                                                        '<a href="#" onclick="return link_typo3Page(\''.$expPageId.'\',\'#'.rawurlencode($sval).'\');">'.
                                                                        htmlspecialchars(' <A> '.$sval).
                                                                        '</a><br />';
@@ -2059,8 +2051,6 @@ class browse_links {
         * @return      string          HTML output
         */
        function expandFolder($expandFolder=0,$extensionList='')        {
-               global $BACK_PATH;
-
                $expandFolder = $expandFolder ? $expandFolder : $this->expandFolder;
                $out='';
                if ($expandFolder && $this->checkFolder($expandFolder)) {
@@ -2078,11 +2068,11 @@ class browse_links {
 
                                // Create header element; The folder from which files are listed.
                        $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
-                       $picon='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/i/_icon_webfolders.gif','width="18" height="16"').' alt="" />';
+                       $picon='<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/i/_icon_webfolders.gif','width="18" height="16"').' alt="" />';
                        $picon.=htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($expandFolder),$titleLen));
                        $picon='<a href="#" onclick="return link_folder(\''.t3lib_div::rawUrlEncodeFP(substr($expandFolder,strlen(PATH_site))).'\');">'.$picon.'</a>';
                        if ($this->curUrlInfo['act'] == 'folder' && $cmpPath == $expandFolder)  {
-                               $out.= '<img'.t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/blinkarrow_left.gif', 'width="5" height="9"') . ' class="c-blinkArrowL" alt="" />';
+                               $out.= '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_left.gif', 'width="5" height="9"') . ' class="c-blinkArrowL" alt="" />';
                        }
                        $out.=$picon.'<br />';
 
@@ -2102,25 +2092,25 @@ class browse_links {
 
                                        if ($this->mode == 'wizard' && $this->act == 'folder') {
                                                $filepath = $expandFolder.$filepath.'/';
-                                               $icon = '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/i/_icon_webfolders.gif', 'width="18" height="16"') . ' alt="" />';
+                                               $icon = '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/i/_icon_webfolders.gif', 'width="18" height="16"') . ' alt="" />';
                                        } else {
                                                        // File icon:
                                                $icon = t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
 
                                                        // Get size and icon:
                                                $size = ' (' . t3lib_div::formatSize(filesize($filepath)) . 'bytes)';
-                                               $icon = '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/fileicons/' . $icon . '', 'width="18" height="16"') . ' title="' . htmlspecialchars($fI['basename'] . $size) . '" alt="" />';
+                                               $icon = '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/fileicons/' . $icon . '', 'width="18" height="16"') . ' title="' . htmlspecialchars($fI['basename'] . $size) . '" alt="" />';
                                        }
 
                                                // If the listed file turns out to be the CURRENT file, then show blinking arrow:
                                        if (($this->curUrlInfo['act'] == 'file' || $this->curUrlInfo['act'] == 'folder') && $cmpPath == $filepath) {
-                                               $arrCol='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/blinkarrow_left.gif','width="5" height="9"').' class="c-blinkArrowL" alt="" />';
+                                               $arrCol='<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/blinkarrow_left.gif','width="5" height="9"').' class="c-blinkArrowL" alt="" />';
                                        } else {
                                                $arrCol='';
                                        }
 
                                                // Put it all together for the file element:
-                                       $out.='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/join'.($c==$cc?'bottom':'').'.gif','width="18" height="16"').' alt="" />'.
+                                       $out.='<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/join'.($c==$cc?'bottom':'').'.gif','width="18" height="16"').' alt="" />'.
                                                        $arrCol.
                                                        '<a href="#" onclick="return link_folder(\''.t3lib_div::rawUrlEncodeFP(substr($filepath,strlen(PATH_site))).'\');">'.
                                                        $icon.
@@ -2163,8 +2153,6 @@ class browse_links {
         * @return      string          HTML output
         */
        function fileList($files, $folderName='', $noThumbs=0) {
-               global $BACK_PATH;
-
                $out='';
 
                        // Listing the files:
@@ -2181,7 +2169,7 @@ class browse_links {
                                // Create the header of current folder:
                        if($folderName) {
                                $picon = '<div id="currentFolderHeader">';
-                               $picon .= '<img' . t3lib_iconWorks::skinImg($BACK_PATH,'gfx/i/_icon_webfolders.gif', 'width="18" height="16"') . ' alt="" /> ';
+                               $picon .= '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/i/_icon_webfolders.gif', 'width="18" height="16"') . ' alt="" /> ';
                                $picon .= htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($folderName), $titleLen));
                                $picon .= '</div>';
                                $out .= $picon;
@@ -2203,7 +2191,7 @@ class browse_links {
                                if (t3lib_div::inList(strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']),strtolower($fI['extension'])) && !$noThumbs)      {
                                        $imgInfo = $imgObj->getImageDimensions($filepath);
                                        $pDim = $imgInfo[0].'x'.$imgInfo[1].' pixels';
-                                       $clickIcon = t3lib_BEfunc::getThumbNail($BACK_PATH.'thumbs.php',$filepath,'hspace="5" vspace="5" border="1"');
+                                       $clickIcon = t3lib_BEfunc::getThumbNail($GLOBALS['BACK_PATH'].'thumbs.php',$filepath,'hspace="5" vspace="5" border="1"');
                                } else {
                                        $clickIcon = '';
                                        $pDim = '';
@@ -2212,7 +2200,7 @@ class browse_links {
                                        // Create file icon:
                                $ficon = t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
                                $size=' ('.t3lib_div::formatSize(filesize($filepath)).'bytes'.($pDim?', '.$pDim:'').')';
-                               $icon = '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/fileicons/'.$ficon,'width="18" height="16"').' title="'.htmlspecialchars($fI['basename'].$size).'" class="absmiddle" alt="" />';
+                               $icon = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/fileicons/'.$ficon,'width="18" height="16"').' title="'.htmlspecialchars($fI['basename'].$size).'" class="absmiddle" alt="" />';
 
                                        // Create links for adding the file:
                                if (strstr($filepath,',') || strstr($filepath,'|'))     {       // In case an invalid character is in the filepath, display error message:
@@ -2236,7 +2224,7 @@ class browse_links {
                                $ATag_e='</a>';
 
                                        // Create link to showing details about the file in a window:
-                               $Ahref = $BACK_PATH.'show_item.php?table='.rawurlencode($filepath).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
+                               $Ahref = $GLOBALS['BACK_PATH'].'show_item.php?table='.rawurlencode($filepath).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
                                $ATag2='<a href="'.htmlspecialchars($Ahref).'">';
                                $ATag2_e='</a>';
 
@@ -2248,8 +2236,8 @@ class browse_links {
                                        $lines[]='
                                                <tr class="bgColor4">
                                                        <td nowrap="nowrap">'.$filenameAndIcon.'&nbsp;</td>
-                                                       <td>' . $ATag . '<img' . t3lib_iconWorks::skinImg($BACK_PATH,'gfx/plusbullet2.gif', 'width="18" height="16"') . ' title="' . $GLOBALS['LANG']->getLL('addToList',1) . '" alt="" />' . $ATag_e . '</td>
-                                                       <td nowrap="nowrap">' . ($ATag2 . '<img'.t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/zoom2.gif', 'width="12" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('info', 1) . '" alt="" /> ' . $GLOBALS['LANG']->getLL('info', 1) . $ATag2_e) . '</td>
+                                                       <td>' . $ATag . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/plusbullet2.gif', 'width="18" height="16"') . ' title="' . $GLOBALS['LANG']->getLL('addToList',1) . '" alt="" />' . $ATag_e . '</td>
+                                                       <td nowrap="nowrap">' . ($ATag2 . '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/zoom2.gif', 'width="12" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('info', 1) . '" alt="" /> ' . $GLOBALS['LANG']->getLL('info', 1) . $ATag2_e) . '</td>
                                                        <td nowrap="nowrap">&nbsp;'.$pDim.'</td>
                                                </tr>';
                                        $lines[]='
@@ -2260,8 +2248,8 @@ class browse_links {
                                        $lines[]='
                                                <tr class="bgColor4">
                                                        <td nowrap="nowrap">'.$filenameAndIcon.'&nbsp;</td>
-                                                       <td>' . $ATag . '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/plusbullet2.gif','width="18" height="16"') . ' title="' . $GLOBALS['LANG']->getLL('addToList',1) . '" alt="" />' . $ATag_e . '</td>
-                                                       <td nowrap="nowrap">' . ($ATag2 . '<img' . t3lib_iconWorks::skinImg($BACK_PATH,'gfx/zoom2.gif','width="12" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('info', 1) . '" alt="" /> ' . $GLOBALS['LANG']->getLL('info', 1) . $ATag2_e) . '</td>
+                                                       <td>' . $ATag . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/plusbullet2.gif','width="18" height="16"') . ' title="' . $GLOBALS['LANG']->getLL('addToList',1) . '" alt="" />' . $ATag_e . '</td>
+                                                       <td nowrap="nowrap">' . ($ATag2 . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/zoom2.gif','width="12" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('info', 1) . '" alt="" /> ' . $GLOBALS['LANG']->getLL('info', 1) . $ATag2_e) . '</td>
                                                        <td>&nbsp;</td>
                                                </tr>';
                                }
@@ -2296,8 +2284,6 @@ class browse_links {
         * @return      string          HTML output
         */
        function folderList($baseFolder, $folders) {
-               global $BACK_PATH;
-
                $content = '';
 
                        // Create headline (showing number of folders):
@@ -2323,7 +2309,7 @@ class browse_links {
                                // add the foder icon
                        $folderIcon = $aTag_alt;
                        $folderIcon.= '<img'.t3lib_iconWorks::skinImg(
-                               $BACK_PATH,
+                               $GLOBALS['BACK_PATH'],
                                'gfx/i/_icon_webfolders.gif','width="18" height="16"'
                        ).' alt="" />';
                        $folderIcon.= htmlspecialchars(
@@ -2343,7 +2329,7 @@ class browse_links {
                                        $pathInfo = pathinfo($folderPath);
 
                                                // Create folder icon:
-                                       $icon = '<img src="clear.gif" width="16" height="16" alt="" /><img'.t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/i/_icon_webfolders.gif','width="16" height="16"').' title="'.htmlspecialchars($pathInfo['basename'].$size).'" class="absmiddle" alt="" />';
+                                       $icon = '<img src="clear.gif" width="16" height="16" alt="" /><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/i/_icon_webfolders.gif','width="16" height="16"').' title="'.htmlspecialchars($pathInfo['basename'].$size).'" class="absmiddle" alt="" />';
 
                                                // Create links for adding the folder:
                                        if($this->P['itemName'] != '' && $this->P['formName'] != '') {
@@ -2377,7 +2363,7 @@ class browse_links {
                                                $lines[] = '
                                                        <tr class="bgColor4">
                                                                <td nowrap="nowrap">'.$foldernameAndIcon.'&nbsp;</td>
-                                                               <td>' . $aTag . '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/plusbullet2.gif', 'width="18" height="16"') . ' title="' . $GLOBALS['LANG']->getLL('addToList', 1) . '" alt="" />' . $aTag_e .' </td>
+                                                               <td>' . $aTag . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/plusbullet2.gif', 'width="18" height="16"') . ' title="' . $GLOBALS['LANG']->getLL('addToList', 1) . '" alt="" />' . $aTag_e .' </td>
                                                                <td>&nbsp;</td>
                                                        </tr>';
                                        }
@@ -2413,8 +2399,6 @@ class browse_links {
         * @return      string          HTML output
         */
        function TBE_dragNDrop($expandFolder=0,$extensionList='')       {
-               global $BACK_PATH;
-
                $extensionList = ($extensionList == '*') ? '' : $extensionList;
                $expandFolder = $expandFolder ? $expandFolder : $this->expandFolder;
                $out='';
@@ -2427,7 +2411,7 @@ class browse_links {
                                        $out.=$this->barheader(sprintf($GLOBALS['LANG']->getLL('files').' (%s):',count($files)));
 
                                        $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
-                                       $picon='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/i/_icon_webfolders.gif','width="18" height="16"').' alt="" />';
+                                       $picon='<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/i/_icon_webfolders.gif','width="18" height="16"').' alt="" />';
                                        $picon.=htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($expandFolder),$titleLen));
                                        $out.=$picon.'<br />';
 
@@ -2454,7 +2438,7 @@ class browse_links {
 
                                                        $ficon = t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
                                                        $size=' ('.t3lib_div::formatSize(filesize($filepath)).'bytes'.($pDim?', '.$pDim:'').')';
-                                                       $icon = '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/fileicons/'.$ficon,'width="18" height="16"').' class="absmiddle" title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
+                                                       $icon = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/fileicons/'.$ficon,'width="18" height="16"').' class="absmiddle" title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
                                                        $filenameAndIcon=$icon.htmlspecialchars(t3lib_div::fixed_lgd_cs(basename($filepath),$titleLen));
 
                                                        if (t3lib_div::_GP('noLimit'))  {
@@ -2481,7 +2465,7 @@ class browse_links {
                                                                        <td nowrap="nowrap">'.$filenameAndIcon.'&nbsp;</td>
                                                                        <td nowrap="nowrap">'.
                                                                        ($imgInfo[0]!=$IW ? '<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('noLimit'=>'1'))).'">'.
-                                                                                                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/icon_warning2.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->getLL('clickToRedrawFullSize',1).'" alt="" />'.
+                                                                                                               '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/icon_warning2.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->getLL('clickToRedrawFullSize',1).'" alt="" />'.
                                                                                                                '</a>':'').
                                                                        $pDim.'&nbsp;</td>
                                                                </tr>';
@@ -2587,9 +2571,7 @@ class browse_links {
         * @return      string          HTML for the message (wrapped in a table).
         */
        function getMsgBox($in_msg,$icon='icon_note')   {
-               global $BACK_PATH;
-
-               $msg = '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/'.$icon.'.gif','width="18" height="16"').' alt="" />'.htmlspecialchars($in_msg);
+               $msg = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/'.$icon.'.gif','width="18" height="16"').' alt="" />'.htmlspecialchars($in_msg);
                $msg = '
 
                        <!--
@@ -2707,8 +2689,6 @@ class browse_links {
         * @return      string          HTML for an upload form.
         */
        function uploadForm($path)      {
-               global $BACK_PATH;
-
                if ($this->isReadOnlyFolder($path)) return '';
 
                        // Read configuration of upload field count
@@ -2726,7 +2706,7 @@ class browse_links {
                        <!--
                                Form, for uploading files:
                        -->
-                       <form action="' . $BACK_PATH . 'tce_file.php" method="post" name="editform" id="typo3-uplFilesForm" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '">
+                       <form action="' . $GLOBALS['BACK_PATH'] . 'tce_file.php" method="post" name="editform" id="typo3-uplFilesForm" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '">
                                <table border="0" cellpadding="0" cellspacing="0" id="typo3-uplFiles">
                                        <tr>
                                                <td>' . $this->barheader($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle', 1) . ':') . '</td>
@@ -2772,8 +2752,6 @@ class browse_links {
         * @return      string          HTML for the create folder form.
         */
        function createFolder($path)    {
-               global $BACK_PATH;
-
                if ($this->isReadOnlyFolder($path)) return '';
 
                        // Don't show Folder-create form if it's denied
@@ -2787,7 +2765,7 @@ class browse_links {
                        <!--
                                Form, for creating new folders:
                        -->
-                       <form action="' . $BACK_PATH . 'tce_file.php" method="post" name="editform2" id="typo3-crFolderForm">
+                       <form action="' . $GLOBALS['BACK_PATH'] . 'tce_file.php" method="post" name="editform2" id="typo3-crFolderForm">
                                <table border="0" cellpadding="0" cellspacing="0" id="typo3-crFolder">
                                        <tr>
                                                <td>' . $this->barheader($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle') . ':') . '</td>
@@ -2832,10 +2810,10 @@ class browse_links {
 
                        $out = $this->doc->spacer(15).'<div>' .
                                        '<a href="#" onclick="BrowseLinks.Selector.toggle()">' .
-                                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/clip_select.gif','width="12" height="12"').' title="'.$labelToggleSelection.'" alt="" /> ' .
+                                               '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/clip_select.gif','width="12" height="12"').' title="'.$labelToggleSelection.'" alt="" /> ' .
                                                $labelToggleSelection.'</a>'.$this->doc->spacer(5) .
                                        '<a href="#" onclick="BrowseLinks.Selector.handle()">' .
-                                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/import.gif','width="12" height="12"').' title="'.$labelImportSelection.'" alt="" /> ' .
+                                               '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/import.gif','width="12" height="12"').' title="'.$labelImportSelection.'" alt="" /> ' .
                                                $labelImportSelection.'</a>' .
                                '</div>';
 
index a49b8ef..a757afb 100644 (file)
@@ -297,8 +297,6 @@ class localRecordList extends recordList {
         * @return      string          HTML table with the listing for the record.
         */
        function getTable($table,$id,$rowlist)  {
-               global $TYPO3_CONF_VARS;
-
                        // Loading all TCA details for this table:
                t3lib_div::loadTCA($table);
 
@@ -402,8 +400,8 @@ class localRecordList extends recordList {
                 * @date                        2007-11-16
                 * @request             Malte Jansen  <mail@maltejansen.de>
                 */
-               if(is_array($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['getTable'])) {
-                       foreach($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['getTable'] as $classData) {
+               if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['getTable'])) {
+                       foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['getTable'] as $classData) {
                                $hookObject = t3lib_div::getUserObj($classData);
 
                                if(!($hookObject instanceof t3lib_localRecordListGetTableHook)) {
@@ -815,8 +813,6 @@ class localRecordList extends recordList {
         * @see getTable()
         */
        function renderListHeader($table, $currentIdList)       {
-               global $TYPO3_CONF_VARS;
-
                        // Init:
                $theData = Array();
 
@@ -898,8 +894,8 @@ class localRecordList extends recordList {
                                         * @request             Bernhard Kraft  <krafbt@kraftb.at>
                                         * @usage               Above each listed table in Web>List a header row is shown. This hook allows to modify the icons responsible for the clipboard functions (shown above the clipboard checkboxes when a clipboard other than "Normal" is selected), or other "Action" functions which perform operations on the listed records.
                                         */
-                                       if(is_array($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions']))        {
-                                               foreach($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData)       {
+                                       if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions']))     {
+                                               foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData)    {
                                                        $hookObject = t3lib_div::getUserObj($classData);
                                                        if(!($hookObject instanceof localRecordList_actionsHook))       {
                                                                throw new UnexpectedValueException('$hookObject must implement interface localRecordList_actionsHook', 1195567850);
@@ -990,8 +986,8 @@ class localRecordList extends recordList {
                 * @request             Bernhard Kraft  <krafbt@kraftb.at>
                 * @usage               Above each listed table in Web>List a header row is shown. Containing the labels of all shown fields and additional icons to create new records for this table or perform special clipboard tasks like mark and copy all listed records to clipboard, etc.
                 */
-               if(is_array($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions']))        {
-                       foreach($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData)       {
+               if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions']))     {
+                       foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData)    {
                                $hookObject = t3lib_div::getUserObj($classData);
                                if(!($hookObject instanceof localRecordList_actionsHook))       {
                                        throw new UnexpectedValueException('$hookObject must implement interface localRecordList_actionsHook', 1195567855);
@@ -1150,8 +1146,6 @@ class localRecordList extends recordList {
         * @return      string          HTML table with the control panel (unless disabled)
         */
        function makeControl($table,$row)       {
-               global $SOBE, $TYPO3_CONF_VARS;
-
                if ($this->dontShowClipControlPanels)   return '';
 
                        // Initialize:
@@ -1202,7 +1196,7 @@ class localRecordList extends recordList {
                }
 
                        // If the extended control panel is enabled OR if we are seeing a single table:
-               if ($SOBE->MOD_SETTINGS['bigControlPanel'] || $this->table)     {
+               if ($GLOBALS['SOBE']->MOD_SETTINGS['bigControlPanel'] || $this->table)  {
 
                                // "Info": (All records)
                        $cells['viewBig'] = '<a href="#" onclick="' . htmlspecialchars(
@@ -1278,7 +1272,7 @@ class localRecordList extends recordList {
                                        if (isset($this->currentTable['prev'][$row['uid']]))    {       // Up
                                                $params='&cmd['.$table.']['.$row['uid'].'][move]='.$this->currentTable['prev'][$row['uid']];
                                                $cells['moveUp'] = '<a href="#" onclick="' . htmlspecialchars(
-                                                                       'return jumpToUrl(\'' . $SOBE->doc->issueCommand($params, -1) . '\');'
+                                                                       'return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');'
                                                                ) .'" title="'.$GLOBALS['LANG']->getLL('moveUp', TRUE) . '">' .
                                                                t3lib_iconWorks::getSpriteIcon('actions-move-up') .
                                                                '</a>';
@@ -1287,7 +1281,7 @@ class localRecordList extends recordList {
                                        }
                                        if ($this->currentTable['next'][$row['uid']])   {       // Down
                                                $params='&cmd['.$table.']['.$row['uid'].'][move]='.$this->currentTable['next'][$row['uid']];
-                                               $cells['moveDown']='<a href="#" onclick="'.htmlspecialchars('return jumpToUrl(\''.$SOBE->doc->issueCommand($params,-1).'\');').'" title="'.$GLOBALS['LANG']->getLL('moveDown', TRUE) . '">' .
+                                               $cells['moveDown']='<a href="#" onclick="'.htmlspecialchars('return jumpToUrl(\''.$GLOBALS['SOBE']->doc->issueCommand($params,-1).'\');').'" title="'.$GLOBALS['LANG']->getLL('moveDown', TRUE) . '">' .
                                                                        t3lib_iconWorks::getSpriteIcon('actions-move-down') .
                                                                '</a>';
                                        } else {
@@ -1303,12 +1297,12 @@ class localRecordList extends recordList {
                                if ($permsEdit && $hiddenField && $GLOBALS['TCA'][$table]['columns'][$hiddenField] && (!$GLOBALS['TCA'][$table]['columns'][$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $table . ':' . $hiddenField))) {
                                        if ($row[$hiddenField]) {
                                                $params='&data['.$table.']['.$row['uid'].']['.$hiddenField.']=0';
-                                               $cells['hide']='<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $SOBE->doc->issueCommand($params, -1) . '\');') . '" title="'.$GLOBALS['LANG']->getLL('unHide' . ($table == 'pages' ? 'Page' : ''), TRUE) . '">' .
+                                               $cells['hide']='<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '" title="'.$GLOBALS['LANG']->getLL('unHide' . ($table == 'pages' ? 'Page' : ''), TRUE) . '">' .
                                                                        t3lib_iconWorks::getSpriteIcon('actions-edit-unhide') .
                                                                '</a>';
                                        } else {
                                                $params='&data['.$table.']['.$row['uid'].']['.$hiddenField.']=1';
-                                               $cells['hide']='<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $SOBE->doc->issueCommand($params, -1) . '\');') . '" title="' . $GLOBALS['LANG']->getLL('hide' . ($table == 'pages' ? 'Page' : ''), TRUE) . '">' .
+                                               $cells['hide']='<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '" title="' . $GLOBALS['LANG']->getLL('hide' . ($table == 'pages' ? 'Page' : ''), TRUE) . '">' .
                                                                        t3lib_iconWorks::getSpriteIcon('actions-edit-hide') .
                                                                '</a>';
                                        }
@@ -1331,7 +1325,7 @@ class localRecordList extends recordList {
                                                $this->getReferenceCount($table, $row['uid'])
                                        ) .
                                                t3lib_BEfunc::translationCount($table, $row['uid'], ' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.translationsOfRecord'));
-                                       $cells['delete'] = '<a href="#" onclick="' . htmlspecialchars('if (confirm(' . $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('deleteWarning') . ' "' .  $title . '" ' . $refCountMsg) . ')) {jumpToUrl(\'' . $SOBE->doc->issueCommand($params, -1) . '\');} return false;') . '" title="' . $GLOBALS['LANG']->getLL('delete', TRUE) . '">' .
+                                       $cells['delete'] = '<a href="#" onclick="' . htmlspecialchars('if (confirm(' . $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('deleteWarning') . ' "' .  $title . '" ' . $refCountMsg) . ')) {jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');} return false;') . '" title="' . $GLOBALS['LANG']->getLL('delete', TRUE) . '">' .
                                                        t3lib_iconWorks::getSpriteIcon('actions-edit-delete') .
                                                        '</a>';
                                } elseif(!$this->table) {
@@ -1344,7 +1338,7 @@ class localRecordList extends recordList {
                                                // Up (Paste as the page right after the current parent page)
                                        if ($this->calcPerms&8) {
                                                $params='&cmd['.$table.']['.$row['uid'].'][move]='.-$this->id;
-                                               $cells['moveLeft'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $SOBE->doc->issueCommand($params, -1) . '\');') . '" title="' . $GLOBALS['LANG']->getLL('prevLevel', TRUE) . '">' .
+                                               $cells['moveLeft'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '" title="' . $GLOBALS['LANG']->getLL('prevLevel', TRUE) . '">' .
                                                                        t3lib_iconWorks::getSpriteIcon('actions-move-left') .
                                                                '</a>';
                                        }
@@ -1353,7 +1347,7 @@ class localRecordList extends recordList {
                                                $localCalcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages',$this->currentTable['prevUid'][$row['uid']]));
                                                if ($localCalcPerms&8)  {
                                                        $params='&cmd['.$table.']['.$row['uid'].'][move]='.$this->currentTable['prevUid'][$row['uid']];
-                                                       $cells['moveRight'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $SOBE->doc->issueCommand($params, -1) . '\');') . '" title="' . $GLOBALS['LANG']->getLL('nextLevel', TRUE) . '">' .
+                                                       $cells['moveRight'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '" title="' . $GLOBALS['LANG']->getLL('nextLevel', TRUE) . '">' .
                                                                                t3lib_iconWorks::getSpriteIcon('actions-move-right') .
                                                                        '</a>';
                                                } else {
@@ -1375,10 +1369,10 @@ class localRecordList extends recordList {
                 * @date                        2007-09-22
                 * @request             Kasper Skårhøj  <kasper2007@typo3.com>
                 */
-               if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['recStatInfoHooks']))     {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks']))  {
                        $stat='';
                        $_params = array($table,$row['uid']);
-                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef)     {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef)  {
                                $stat.=t3lib_div::callUserFunction($_funcRef,$_params,$this);
                        }
                        $cells['stat'] = $stat;
@@ -1389,8 +1383,8 @@ class localRecordList extends recordList {
                 * @request             Bernhard Kraft  <krafbt@kraftb.at>
                 * @usage               This hook method gets passed the current $cells array as third parameter. This array contains values for the icons/actions generated for each record in Web>List. Each array entry is accessible by an index-key. The order of the icons is dependend on the order of those array entries.
                 */
-               if(is_array($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'])) {
-                       foreach($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData) {
+               if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'])) {
+                       foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData) {
                                $hookObject = t3lib_div::getUserObj($classData);
                                if(!($hookObject instanceof localRecordList_actionsHook))       {
                                        throw new UnexpectedValueException('$hookObject must implement interface localRecordList_actionsHook', 1195567840);
@@ -1413,8 +1407,6 @@ class localRecordList extends recordList {
         * @return      string          HTML table with the clipboard panel (unless disabled)
         */
        function makeClip($table,$row)  {
-               global $TYPO3_CONF_VARS;
-
                        // Return blank, if disabled:
                if ($this->dontShowClipControlPanels)   return '';
                $cells=array();
@@ -1480,8 +1472,8 @@ class localRecordList extends recordList {
                 * @request             Bernhard Kraft  <krafbt@kraftb.at>
                 * @usage               This hook method gets passed the current $cells array as third parameter. This array contains values for the clipboard icons generated for each record in Web>List. Each array entry is accessible by an index-key. The order of the icons is dependend on the order of those array entries.
                 */
-               if(is_array($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'])) {
-                       foreach($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData) {
+               if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'])) {
+                       foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData) {
                                $hookObject = t3lib_div::getUserObj($classData);
                                if(!($hookObject instanceof localRecordList_actionsHook))       {
                                        throw new UnexpectedValueException('$hookObject must implement interface localRecordList_actionsHook', 1195567845);
index fe66914..aa9e80f 100644 (file)
@@ -506,8 +506,6 @@ class ShortcutMenu implements backend_toolbarItem {
         * @return      void
         */
        public function createAjaxShortcut($params = array(), TYPO3AJAX &$ajaxObj = NULL) {
-               global $LANG;
-
                $shortcutCreated     = 'failed';
                $shortcutName        = 'Shortcut'; // default name
                $shortcutNamePrepend = '';
index d5c4bea..90f44ec 100644 (file)
@@ -73,13 +73,11 @@ class SC_dummy {
         * @return      void
         */
        function main() {
-               global $TBE_TEMPLATE;
-
                        // Start page
-               $this->content.=$TBE_TEMPLATE->startPage('Dummy document');
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->startPage('Dummy document');
 
                        // End page:
-               $this->content.=$TBE_TEMPLATE->endPage();
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->endPage();
        }
 
        /**
index 58a6579..9d4d82e 100644 (file)
@@ -47,7 +47,7 @@
  *
  */
 
-$BACK_PATH = '';
+$GLOBALS['BACK_PATH'] = '';
 require('init.php');
 require('template.php');
 
@@ -91,16 +91,13 @@ class SC_file_edit {
         * @return      void
         */
        function init() {
-               //TODO remove global
-               global $BACK_PATH,$TYPO3_CONF_VARS;
-
                        // Setting target, which must be a file reference to a file within the mounts.
                $this->target = $this->origTarget = t3lib_div::_GP('target');
                $this->returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
 
                        // Creating file management object:
                $this->basicff = t3lib_div::makeInstance('t3lib_basicFileFunctions');
-               $this->basicff->init($GLOBALS['FILEMOUNTS'],$TYPO3_CONF_VARS['BE']['fileExtensions']);
+               $this->basicff->init($GLOBALS['FILEMOUNTS'],$GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
 
 
                if (file_exists($this->target)) {
@@ -139,7 +136,7 @@ class SC_file_edit {
                // ***************************
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->setModuleTemplate('templates/file_edit.html');
-               $this->doc->backPath = $BACK_PATH;
+               $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->JScode=$this->doc->wrapScriptTags('
                        function backToList()   {       //
                                top.goToModule("file_list");
index 7e4ac54..677ed38 100644 (file)
@@ -102,15 +102,13 @@ class SC_file_rename {
         * @return      void
         */
        function init() {
-               global $TYPO3_CONF_VARS;
-
                        // Initialize GPvars:
                $this->target = t3lib_div::_GP('target');
                $this->returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
 
                        // Init basic-file-functions object:
                $this->basicff = t3lib_div::makeInstance('t3lib_basicFileFunctions');
-               $this->basicff->init($GLOBALS['FILEMOUNTS'],$TYPO3_CONF_VARS['BE']['fileExtensions']);
+               $this->basicff->init($GLOBALS['FILEMOUNTS'],$GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
 
                        // Cleaning and checking target
                if (file_exists($this->target)) {
index 55b0d77..d534a4d 100644 (file)
@@ -177,18 +177,16 @@ class SC_index {
         * @return      void
         */
        function main() {
-               global $TBE_TEMPLATE;
-
                        // Initialize template object:
-               $TBE_TEMPLATE->bodyTagAdditions = ' onload="startUp();"';
-               $TBE_TEMPLATE->moduleTemplate = $TBE_TEMPLATE->getHtmlTemplate('templates/login.html');
+               $GLOBALS['TBE_TEMPLATE']->bodyTagAdditions = ' onload="startUp();"';
+               $GLOBALS['TBE_TEMPLATE']->moduleTemplate = $GLOBALS['TBE_TEMPLATE']->getHtmlTemplate('templates/login.html');
 
-               $TBE_TEMPLATE->getPageRenderer()->loadExtJS();
-               $TBE_TEMPLATE->getPageRenderer()->loadPrototype();
-               $TBE_TEMPLATE->getPageRenderer()->loadScriptaculous();
+               $GLOBALS['TBE_TEMPLATE']->getPageRenderer()->loadExtJS();
+               $GLOBALS['TBE_TEMPLATE']->getPageRenderer()->loadPrototype();
+               $GLOBALS['TBE_TEMPLATE']->getPageRenderer()->loadScriptaculous();
 
                        // Set JavaScript for creating a MD5 hash of the password:
-               $TBE_TEMPLATE->JScode.= $this->getJScode();
+               $GLOBALS['TBE_TEMPLATE']->JScode.= $this->getJScode();
 
                        // Checking, if we should make a redirect.
                        // Might set JavaScript in the header to close window.
@@ -199,10 +197,10 @@ class SC_index {
 
                        // Creating form based on whether there is a login or not:
                if (!$GLOBALS['BE_USER']->user['uid']) {
-                       $TBE_TEMPLATE->form = $this->startForm();
+                       $GLOBALS['TBE_TEMPLATE']->form = $this->startForm();
                        $loginForm = $this->makeLoginForm();
                } else {
-                       $TBE_TEMPLATE->form = '
+                       $GLOBALS['TBE_TEMPLATE']->form = '
                                <form action="index.php" method="post" name="loginform">
                                <input type="hidden" name="login_status" value="logout" />
                                ';
@@ -210,12 +208,12 @@ class SC_index {
                }
 
                        // Starting page:
-               $this->content .= $TBE_TEMPLATE->startPage('TYPO3 Login: ' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']), FALSE);
+               $this->content .= $GLOBALS['TBE_TEMPLATE']->startPage('TYPO3 Login: ' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']), FALSE);
 
                        // Add login form:
                $this->content.=$this->wrapLoginForm($loginForm);
 
-               $this->content.= $TBE_TEMPLATE->endPage();
+               $this->content.= $GLOBALS['TBE_TEMPLATE']->endPage();
        }
 
        /**
@@ -354,8 +352,6 @@ class SC_index {
         * @return      void
         */
        function checkRedirect()        {
-               global $TBE_TEMPLATE;
-
                        // Do redirect:
                        // If a user is logged in AND a) if either the login is just done (commandLI) or b) a loginRefresh is done or c) the interface-selector is NOT enabled (If it is on the other hand, it should not just load an interface, because people has to choose then...)
                if ($GLOBALS['BE_USER']->user['uid'] && ($this->commandLI || $this->loginRefresh || !$this->interfaceSelector)) {
@@ -400,7 +396,7 @@ class SC_index {
                        } else {
                                $formProtection->setSessionTokenFromRegistry();
                                $formProtection->persistSessionToken();
-                               $TBE_TEMPLATE->JScode.=$TBE_TEMPLATE->wrapScriptTags('
+                               $GLOBALS['TBE_TEMPLATE']->JScode.=$GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
                                        if (parent.opener && (parent.opener.busy || parent.opener.TYPO3.loginRefresh)) {
                                                if (parent.opener.TYPO3.loginRefresh) {
                                                        parent.opener.TYPO3.loginRefresh.startTimer();
@@ -422,16 +418,14 @@ class SC_index {
         * @return      void
         */
        function makeInterfaceSelectorBox()     {
-               global $TYPO3_CONF_VARS;
-
                        // Reset variables:
                $this->interfaceSelector = '';
                $this->interfaceSelector_hidden='';
                $this->interfaceSelector_jump = '';
 
                        // If interfaces are defined AND no input redirect URL in GET vars:
-               if ($TYPO3_CONF_VARS['BE']['interfaces'] && ($this->commandLI || !$this->redirect_url)) {
-                       $parts = t3lib_div::trimExplode(',',$TYPO3_CONF_VARS['BE']['interfaces']);
+               if ($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces'] && ($this->commandLI || !$this->redirect_url))      {
+                       $parts = t3lib_div::trimExplode(',',$GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces']);
                        if (count($parts)>1)    {       // Only if more than one interface is defined will we show the selector:
 
                                        // Initialize:
@@ -462,7 +456,7 @@ class SC_index {
 
                        } elseif (!$this->redirect_url) {
                                        // If there is only ONE interface value set and no redirect_url is present:
-                               $this->interfaceSelector_hidden='<input type="hidden" name="interface" value="'.trim($TYPO3_CONF_VARS['BE']['interfaces']).'" />';
+                               $this->interfaceSelector_hidden='<input type="hidden" name="interface" value="'.trim($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces']).'" />';
                        }
                }
        }
@@ -554,7 +548,7 @@ class SC_index {
 
        /**
         * Make login news - renders the HTML content for a list of news shown under
-        * the login form. News data is added through $TYPO3_CONF_VARS
+        * the login form. News data is added through $GLOBALS['TYPO3_CONF_VARS']
         *
         * @return      string          HTML content
         * @credits                     Idea by Jan-Hendrik Heuing
@@ -830,4 +824,4 @@ $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>
index be8fa4b..e4145d6 100644 (file)
@@ -72,16 +72,14 @@ class SC_listframe_loader {
         * @return      void
         */
        function main() {
-               global $TBE_TEMPLATE;
-
-               $TBE_TEMPLATE->divClass='';
-               $this->content.=$TBE_TEMPLATE->startPage('List Frame Loader');
-               $this->content.=$TBE_TEMPLATE->wrapScriptTags('
+               $GLOBALS['TBE_TEMPLATE']->divClass='';
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->startPage('List Frame Loader');
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
                        var theUrl = top.getModuleUrl("");
                        if (theUrl)     window.location.href=theUrl;
                ');
                        // End page:
-               $this->content.=$TBE_TEMPLATE->endPage();
+               $this->content.=$GLOBALS['TBE_TEMPLATE']->endPage();
 
                        // Output:
                echo $this->content;
index 0d9c5ca..fa55cb7 100644 (file)
@@ -78,12 +78,10 @@ class SC_login_frameset {
         * @return      void
         */
        function main() {
-               global $TYPO3_CONF_VARS;
-
                        // Set doktype:
                $GLOBALS['TBE_TEMPLATE']->docType='xhtml_frames';
 
-               $title = 'TYPO3 Re-Login ('.$TYPO3_CONF_VARS['SYS']['sitename'].')';
+               $title = 'TYPO3 Re-Login ('.$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'].')';
                $this->content.=$GLOBALS['TBE_TEMPLATE']->startPage($title);
 
                        // Create the frameset for the window:
index 4268987..6894645 100644 (file)
@@ -55,9 +55,9 @@
  */
 
 
-$BACK_PATH = '';
-require($BACK_PATH.'init.php');
-require($BACK_PATH.'template.php');
+$GLOBALS['BACK_PATH'] = '';
+require('init.php');
+require('template.php');
 
 
 
@@ -159,8 +159,6 @@ class SC_show_item {
         * @return      void
         */
        function init() {
-               global $BACK_PATH;
-
                        // Setting input variables.
                $this->table = t3lib_div::_GET('table');
                $this->uid = t3lib_div::_GET('uid');
@@ -209,7 +207,7 @@ class SC_show_item {
 
                        // Initialize document template object:
                $this->doc = t3lib_div::makeInstance('template');
-               $this->doc->backPath = $BACK_PATH;
+               $this->doc->backPath = $GLOBALS['BACK_PATH'];
 
                        // Starting the page by creating page header stuff:
                $this->content.=$this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.viewItem'));
index 65b5464..72ce0ae 100644 (file)
@@ -168,7 +168,7 @@ class template {
        var $endJS=1;                                   // If set, then a JavaScript section will be outputted in the bottom of page which will try and update the top.busy session expiry object.
 
                // TYPO3 Colorscheme.
-               // If you want to change this, please do so through a skin using the global var $TBE_STYLES
+               // If you want to change this, please do so through a skin using the global var $GLOBALS['TBE_STYLES']
        var $bgColor = '#F7F3EF';               // Light background color
        var $bgColor2 = '#9BA1A8';              // Steel-blue
        var $bgColor3 = '#F6F2E6';              // dok.color
@@ -241,13 +241,11 @@ class template {
 
        /**
         * Constructor
-        * Imports relevant parts from global $TBE_STYLES (colorscheme)
+        * Imports relevant parts from global $GLOBALS['TBE_STYLES'] (colorscheme)
         *
         * @return      void
         */
        function __construct()  {
-               global $TBE_STYLES;
-
                        // Initializes the page rendering object:
                $this->getPageRenderer();
 
@@ -264,27 +262,27 @@ class template {
                $this->bodyTagId = preg_replace('/[^A-Za-z0-9-]/','-',$this->scriptID);
 
                        // Individual configuration per script? If so, make a recursive merge of the arrays:
-               if (is_array($TBE_STYLES['scriptIDindex'][$this->scriptID]))    {
-                       $ovr = $TBE_STYLES['scriptIDindex'][$this->scriptID];           // Make copy
-                       $TBE_STYLES = t3lib_div::array_merge_recursive_overrule($TBE_STYLES,$ovr);              // merge styles.
-                       unset($TBE_STYLES['scriptIDindex'][$this->scriptID]);   // Have to unset - otherwise the second instantiation will do it again!
+               if (is_array($GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID])) {
+                       $ovr = $GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID];                // Make copy
+                       $GLOBALS['TBE_STYLES'] = t3lib_div::array_merge_recursive_overrule($GLOBALS['TBE_STYLES'],$ovr);                // merge styles.
+                       unset($GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID]);        // Have to unset - otherwise the second instantiation will do it again!
                }
 
                        // Color scheme:
-               if ($TBE_STYLES['mainColors']['bgColor'])       $this->bgColor=$TBE_STYLES['mainColors']['bgColor'];
-               if ($TBE_STYLES['mainColors']['bgColor1'])      $this->bgColor1=$TBE_STYLES['mainColors']['bgColor1'];
-               if ($TBE_STYLES['mainColors']['bgColor2'])      $this->bgColor2=$TBE_STYLES['mainColors']['bgColor2'];
-               if ($TBE_STYLES['mainColors']['bgColor3'])      $this->bgColor3=$TBE_STYLES['mainColors']['bgColor3'];
-               if ($TBE_STYLES['mainColors']['bgColor4'])      $this->bgColor4=$TBE_STYLES['mainColors']['bgColor4'];
-               if ($TBE_STYLES['mainColors']['bgColor5'])      $this->bgColor5=$TBE_STYLES['mainColors']['bgColor5'];
-               if ($TBE_STYLES['mainColors']['bgColor6'])      $this->bgColor6=$TBE_STYLES['mainColors']['bgColor6'];
-               if ($TBE_STYLES['mainColors']['hoverColor'])    $this->hoverColor=$TBE_STYLES['mainColors']['hoverColor'];
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor'])    $this->bgColor=$GLOBALS['TBE_STYLES']['mainColors']['bgColor'];
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor1'])   $this->bgColor1=$GLOBALS['TBE_STYLES']['mainColors']['bgColor1'];
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor2'])   $this->bgColor2=$GLOBALS['TBE_STYLES']['mainColors']['bgColor2'];
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor3'])   $this->bgColor3=$GLOBALS['TBE_STYLES']['mainColors']['bgColor3'];
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor4'])   $this->bgColor4=$GLOBALS['TBE_STYLES']['mainColors']['bgColor4'];
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor5'])   $this->bgColor5=$GLOBALS['TBE_STYLES']['mainColors']['bgColor5'];
+               if ($GLOBALS['TBE_STYLES']['mainColors']['bgColor6'])   $this->bgColor6=$GLOBALS['TBE_STYLES']['mainColors']['bgColor6'];
+               if ($GLOBALS['TBE_STYLES']['mainColors']['hoverColor']) $this->hoverColor=$GLOBALS['TBE_STYLES']['mainColors']['hoverColor'];
 
                        // Main Stylesheets:
-               if ($TBE_STYLES['stylesheet'])  $this->styleSheetFile = $TBE_STYLES['stylesheet'];
-               if ($TBE_STYLES['stylesheet2']) $this->styleSheetFile2 = $TBE_STYLES['stylesheet2'];
-               if ($TBE_STYLES['styleSheetFile_post']) $this->styleSheetFile_post = $TBE_STYLES['styleSheetFile_post'];
-               if ($TBE_STYLES['inDocStyles_TBEstyle'])        $this->inDocStyles_TBEstyle = $TBE_STYLES['inDocStyles_TBEstyle'];
+               if ($GLOBALS['TBE_STYLES']['stylesheet'])       $this->styleSheetFile = $GLOBALS['TBE_STYLES']['stylesheet'];
+               if ($GLOBALS['TBE_STYLES']['stylesheet2'])      $this->styleSheetFile2 = $GLOBALS['TBE_STYLES']['stylesheet2'];
+               if ($GLOBALS['TBE_STYLES']['styleSheetFile_post'])      $this->styleSheetFile_post = $GLOBALS['TBE_STYLES']['styleSheetFile_post'];
+               if ($GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle'])     $this->inDocStyles_TBEstyle = $GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle'];
 
                        // include all stylesheets
                foreach ($this->getSkinStylesheetDirectories() as $stylesheetDirectory) {
@@ -292,7 +290,7 @@ class template {
                }
 
                        // Background image
-               if ($TBE_STYLES['background'])  $this->backGroundImage = $TBE_STYLES['background'];
+               if ($GLOBALS['TBE_STYLES']['background'])       $this->backGroundImage = $GLOBALS['TBE_STYLES']['background'];
        }
 
 
@@ -1211,7 +1209,7 @@ $str.=$this->docBodyTagBegin().
                                $skinStylesheetDirs = $this->stylesheetsSkins;
 
                                        // skins can add custom stylesheetDirectories using
-                                       // $TBE_STYLES['skins'][$_EXTKEY]['stylesheetDirectories']
+                                       // $GLOBALS['TBE_STYLES']['skins'][$_EXTKEY]['stylesheetDirectories']
                                if (is_array($skin['stylesheetDirectories'])) {
                                        $skinStylesheetDirs = array_merge($skinStylesheetDirs, $skin['stylesheetDirectories']);
                                }
index c56fb1a..7db57ef 100644 (file)
@@ -75,7 +75,7 @@
 
 require('init.php');
 require('template.php');
-$LANG->includeLLFile('EXT:lang/locallang_view_help.xml');
+$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_view_help.xml');
 
 
 /**
@@ -229,7 +229,7 @@ class SC_view_help {
                }
 
                        // Print close-button:
-#              $this->content.='<br /><form action=""><input type="submit" value="'.htmlspecialchars($LANG->getLL('close')).'" onclick="self.close(); return false;" /></form><br/>';
+#              $this->content.='<br /><form action=""><input type="submit" value="'.htmlspecialchars($GLOBALS['LANG']->getLL('close')).'" onclick="self.close(); return false;" /></form><br/>';
 
                        // End page:
                $this->content.= '<br/>';
@@ -265,10 +265,8 @@ class SC_view_help {
         * @return      string          HTML content
         */
        function render_TOC()   {
-               global $TCA_DESCR,$LANG;
-
                        // Initialize:
-               $CSHkeys = array_flip(array_keys($TCA_DESCR));
+               $CSHkeys = array_flip(array_keys($GLOBALS['TCA_DESCR']));
                $TCAkeys = array_keys($GLOBALS['TCA']);
 
                $outputSections = array();
@@ -276,7 +274,7 @@ class SC_view_help {
 
 
                        // TYPO3 Core Features:
-               $LANG->loadSingleTableDescription('xMOD_csh_corebe');
+               $GLOBALS['LANG']->loadSingleTableDescription('xMOD_csh_corebe');
                $this->render_TOC_el('xMOD_csh_corebe', 'core', $outputSections, $tocArray, $CSHkeys);
 
                        // Backend Modules:
@@ -285,7 +283,7 @@ class SC_view_help {
                foreach($loadModules->modules as $mainMod => $info)     {
                        $cshKey = '_MOD_'.$mainMod;
                        if ($CSHkeys[$cshKey])  {
-                               $LANG->loadSingleTableDescription($cshKey);
+                               $GLOBALS['LANG']->loadSingleTableDescription($cshKey);
                                $this->render_TOC_el($cshKey, 'modules', $outputSections, $tocArray, $CSHkeys);
                        }
 
@@ -293,7 +291,7 @@ class SC_view_help {
                                foreach($info['sub'] as $subMod => $subInfo)    {
                                        $cshKey = '_MOD_'.$mainMod.'_'.$subMod;
                                        if ($CSHkeys[$cshKey])  {
-                                               $LANG->loadSingleTableDescription($cshKey);
+                                               $GLOBALS['LANG']->loadSingleTableDescription($cshKey);
                                                $this->render_TOC_el($cshKey, 'modules', $outputSections, $tocArray, $CSHkeys);
                                        }
                                }
@@ -303,8 +301,8 @@ class SC_view_help {
                        // Database Tables:
                foreach($TCAkeys as $table)     {
                                // Load descriptions for table $table
-                       $LANG->loadSingleTableDescription($table);
-                       if (is_array($TCA_DESCR[$table]['columns']) && $GLOBALS['BE_USER']->check('tables_select',$table)) {
+                       $GLOBALS['LANG']->loadSingleTableDescription($table);
+                       if (is_array($GLOBALS['TCA_DESCR'][$table]['columns']) && $GLOBALS['BE_USER']->check('tables_select',$table)) {
                                $this->render_TOC_el($table, 'tables', $outputSections, $tocArray, $CSHkeys);
                        }
                }
@@ -312,7 +310,7 @@ class SC_view_help {
                        // Extensions
                foreach($CSHkeys as $cshKey => $value)  {
                        if (t3lib_div::isFirstPartOfStr($cshKey, 'xEXT_') && !isset($GLOBALS['TCA'][$cshKey])) {
-                               $LANG->loadSingleTableDescription($cshKey);
+                               $GLOBALS['LANG']->loadSingleTableDescription($cshKey);
                                $this->render_TOC_el($cshKey, 'extensions', $outputSections, $tocArray, $CSHkeys);
                        }
                }
@@ -320,7 +318,7 @@ class SC_view_help {
                        // Glossary
                foreach($CSHkeys as $cshKey => $value)  {
                        if (t3lib_div::isFirstPartOfStr($cshKey, 'xGLOSSARY_') && !isset($GLOBALS['TCA'][$cshKey])) {
-                               $LANG->loadSingleTableDescription($cshKey);
+                               $GLOBALS['LANG']->loadSingleTableDescription($cshKey);
                                $this->render_TOC_el($cshKey, 'glossary', $outputSections, $tocArray, $CSHkeys);
                        }
                }
@@ -328,7 +326,7 @@ class SC_view_help {
                        // Other:
                foreach($CSHkeys as $cshKey => $value)  {
                        if (!t3lib_div::isFirstPartOfStr($cshKey, '_MOD_') && !isset($GLOBALS['TCA'][$cshKey])) {
-                               $LANG->loadSingleTableDescription($cshKey);
+                               $GLOBALS['LANG']->loadSingleTableDescription($cshKey);
                                $this->render_TOC_el($cshKey, 'other', $outputSections, $tocArray, $CSHkeys);
                        }
                }
@@ -338,28 +336,28 @@ class SC_view_help {
                $output = '';
                $output.= '
 
-                       <h1>'.$LANG->getLL('manual_title',1).'</h1>';
+                       <h1>'.$GLOBALS['LANG']->getLL('manual_title',1).'</h1>';
 
                $output.= '
 
-                       <h2>'.$LANG->getLL('introduction',1).'</h2>
-                       <p>'.$LANG->getLL('description',1).'</p>';
+                       <h2>'.$GLOBALS['LANG']->getLL('introduction',1).'</h2>
+                       <p>'.$GLOBALS['LANG']->getLL('description',1).'</p>';
 
                $output.= '
 
-                       <h2>'.$LANG->getLL('TOC',1).'</h2>'.
+                       <h2>'.$GLOBALS['LANG']->getLL('TOC',1).'</h2>'.
                        $this->render_TOC_makeTocList($tocArray);
 
                if (!$this->renderALL)  {
                        $output.= '
                                <br/>
-                               <p class="c-nav"><a href="view_help.php?renderALL=1">'.$LANG->getLL('full_manual',1).'</a></p>';
+                               <p class="c-nav"><a href="view_help.php?renderALL=1">'.$GLOBALS['LANG']->getLL('full_manual',1).'</a></p>';
                }
 
                if ($this->renderALL)   {
                        $output.= '
 
-                               <h2>'.$LANG->getLL('full_manual_chapters',1).'</h2>'.
+                               <h2>'.$GLOBALS['LANG']->getLL('full_manual_chapters',1).'</h2>'.
                                implode('
 
 
@@ -383,8 +381,6 @@ class SC_view_help {
         * @return      void
         */
        function render_TOC_el($table, $tocCat, &$outputSections, &$tocArray, &$CSHkeys)        {
-               global $LANG;
-
                if ($this->renderALL)   {       // Render full manual right here!
                        $outputSections[$table] = $this->render_Table($table);
 
@@ -392,7 +388,7 @@ class SC_view_help {
                                $outputSections[$table] = '
 
                <!-- New CSHkey/Table: '.$table.' -->
-               <p class="c-nav"><a name="ANCHOR_'.$table.'" href="#">'.$LANG->getLL('to_top',1).'</a></p>
+               <p class="c-nav"><a name="ANCHOR_'.$table.'" href="#">'.$GLOBALS['LANG']->getLL('to_top',1).'</a></p>
                <h2>'.$this->getTableFieldLabel($table).'</h2>
 
                '.$outputSections[$table];
@@ -415,8 +411,6 @@ class SC_view_help {
         * @return      string          HTML bullet list for index.
         */
        function render_TOC_makeTocList($tocArray)      {
-               global $LANG;
-
                        // The Various manual sections:
                $keys = explode(',', 'core,modules,tables,extensions,glossary,other');
 
@@ -425,7 +419,7 @@ class SC_view_help {
                foreach($keys as $tocKey)       {
                        if (is_array($tocArray[$tocKey]))       {
                                $output.='
-                                       <li>'.$LANG->getLL('TOC_'.$tocKey,1).'
+                                       <li>'.$GLOBALS['LANG']->getLL('TOC_'.$tocKey,1).'
                                                <ul>
                                                        <li>'.implode('</li>
                                                        <li>',$tocArray[$tocKey]).'</li>
@@ -455,23 +449,21 @@ class SC_view_help {
         * @return string HTML output
         */
        function render_Table($key, $table) {
-               global $TCA_DESCR,$LANG;
-
                $output = '';
 
                        // Load table TCA
                t3lib_div::loadTCA($key);
 
                        // Load descriptions for table $table
-               $LANG->loadSingleTableDescription($key);
+               $GLOBALS['LANG']->loadSingleTableDescription($key);
 
-               if (is_array($TCA_DESCR[$key]['columns']) && (!$this->limitAccess || $GLOBALS['BE_USER']->check('tables_select', $table))) {
+               if (is_array($GLOBALS['TCA_DESCR'][$key]['columns']) && (!$this->limitAccess || $GLOBALS['BE_USER']->check('tables_select', $table))) {
                                // Initialize variables:
                        $parts = array();
                        $parts[0] = ''; // Reserved for header of table
 
                                // Traverse table columns as listed in TCA_DESCR
-                       foreach ($TCA_DESCR[$key]['columns'] as $field => $_) {
+                       foreach ($GLOBALS['TCA_DESCR'][$key]['columns'] as $field => $_) {
 
                                $fieldValue = isset($GLOBALS['TCA'][$key]) && strcmp($field, '') ? $GLOBALS['TCA'][$key]['columns'][$field] : array();
 
@@ -495,7 +487,7 @@ class SC_view_help {
 
                        // TOC link:
                if (!$this->renderALL) {
-                       $tocLink = '<p class="c-nav"><a href="view_help.php">' . $LANG->getLL('goToToc', 1) . '</a></p>';
+                       $tocLink = '<p class="c-nav"><a href="view_help.php">' . $GLOBALS['LANG']->getLL('goToToc', 1) . '</a></p>';
 
                        $output =
                                $tocLink.'
@@ -571,8 +563,6 @@ class SC_view_help {
         * @return      string          See-also links HTML
         */
        function make_seeAlso($value,$anchorTable='')   {
-               global $TCA_DESCR;
-
                        // Split references by comma or linebreak
                $items = preg_split('/[,' . LF . ']/', $value);
                $lines = array();
@@ -598,8 +588,8 @@ class SC_view_help {
                                        if (!isset($GLOBALS['TCA'][$iP[0]]) || ((!$iP[1] || is_array($GLOBALS['TCA'][$iP[0]]['columns'][$iP[1]])) && (!$this->limitAccess || ($GLOBALS['BE_USER']->check('tables_select',$iP[0]) && (!$iP[1] || !$GLOBALS['TCA'][$iP[0]]['columns'][$iP[1]]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields',$iP[0].':'.$iP[1]))))))       {       // Checking read access:
 
                                                        // Load table descriptions:
-                                               #$LANG->loadSingleTableDescription($iP[0]);
-                                               if (isset($TCA_DESCR[$iP[0]]))  {
+                                               #$GLOBALS['LANG']->loadSingleTableDescription($iP[0]);
+                                               if (isset($GLOBALS['TCA_DESCR'][$iP[0]]))       {
                                                                // Make see-also link:
                                                        $href = ($this->renderALL || ($anchorTable && $iP[0]==$anchorTable) ? '#'.implode('.',$iP) : 'view_help.php?tfID='.rawurlencode(implode('.',$iP)).'&back='.$this->tfID);
                                                        $label = $this->getTableFieldLabel($iP[0],$iP[1],' / ');
@@ -691,25 +681,24 @@ class SC_view_help {
         * @return string HTML content
         */
        function printItem($key, $field, $anchors = FALSE) {
-               global $TCA_DESCR, $LANG;
                $out = '';
 
                        // Load full table definition in $GLOBALS['TCA']
                t3lib_div::loadTCA($key);
 
-               if ($key && (!$field || is_array($TCA_DESCR[$key]['columns'][$field]))) {
+               if ($key && (!$field || is_array($GLOBALS['TCA_DESCR'][$key]['columns'][$field])))      {
                                // Make seeAlso references.
-                       $seeAlsoRes = $this->make_seeAlso($TCA_DESCR[$key]['columns'][$field]['seeAlso'], $anchors ? $key : '');
+                       $seeAlsoRes = $this->make_seeAlso($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['seeAlso'], $anchors ? $key : '');
 
                                // Making item:
                        $out = '<a name="' . $key . '.' . $field . '"></a>' .
                                        $this->headerLine($this->getTableFieldLabel($key, $field), 1) .
-                                       $this->prepareContent($TCA_DESCR[$key]['columns'][$field]['description']) .
-                                       ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['details'] ? $this->headerLine($LANG->getLL('details').':').$this->prepareContent($TCA_DESCR[$key]['columns'][$field]['details']) : '') .
-                                       ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['syntax'] ? $this->headerLine($LANG->getLL('syntax').':').$this->prepareContent($TCA_DESCR[$key]['columns'][$field]['syntax']) : '') .
-                                       ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['image'] ? $this->printImage($TCA_DESCR[$key]['columns'][$field]['image'],$TCA_DESCR[$key]['columns'][$field]['image_descr']) : '') .
-                                       ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['seeAlso'] && $seeAlsoRes ? $this->headerLine($LANG->getLL('seeAlso').':').'<p>'.$seeAlsoRes.'</p>' : '') .
-                                       ($this->back ? '<br /><p><a href="' . htmlspecialchars('view_help.php?tfID=' . rawurlencode($this->back)) . '" class="typo3-goBack">' . htmlspecialchars($LANG->getLL('goBack')) . '</a></p>' : '') .
+                                       $this->prepareContent($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['description']) .
+                                       ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['details'] ? $this->headerLine($GLOBALS['LANG']->getLL('details').':').$this->prepareContent($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['details']) : '') .
+                                       ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['syntax'] ? $this->headerLine($GLOBALS['LANG']->getLL('syntax').':').$this->prepareContent($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['syntax']) : '') .
+                                       ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['image'] ? $this->printImage($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['image'],$GLOBALS['TCA_DESCR'][$key]['columns'][$field]['image_descr']) : '') .
+                                       ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['seeAlso'] && $seeAlsoRes ? $this->headerLine($GLOBALS['LANG']->getLL('seeAlso').':').'<p>'.$seeAlsoRes.'</p>' : '') .
+                                       ($this->back ? '<br /><p><a href="' . htmlspecialchars('view_help.php?tfID=' . rawurlencode($this->back)) . '" class="typo3-goBack">' . htmlspecialchars($GLOBALS['LANG']->getLL('goBack')) . '</a></p>' : '') .
                                        '<br />';
                }
                return $out;
@@ -754,15 +743,13 @@ class SC_view_help {
         * @return array Table and field labels in a numeric array
         */
        function getTableFieldNames($key, $field) {
-               global $TCA_DESCR, $LANG;
-
-               $LANG->loadSingleTableDescription($key);
+               $GLOBALS['LANG']->loadSingleTableDescription($key);
 
                        // Define the label for the key
                $keyName = $key;
-               if (is_array($TCA_DESCR[$key]['columns']['']) && isset($TCA_DESCR[$key]['columns']['']['alttitle'])) {
+               if (is_array($GLOBALS['TCA_DESCR'][$key]['columns']['']) && isset($GLOBALS['TCA_DESCR'][$key]['columns']['']['alttitle'])) {
                                // If there's an alternative title, use it
-                       $keyName = $TCA_DESCR[$key]['columns']['']['alttitle'];
+                       $keyName = $GLOBALS['TCA_DESCR'][$key]['columns']['']['alttitle'];
                } elseif (isset($GLOBALS['TCA'][$key])) {
                                // Otherwise, if it's a table, use its title
                        $keyName = $GLOBALS['TCA'][$key]['ctrl']['title'];
@@ -772,9 +759,9 @@ class SC_view_help {
                }
                        // Define the label for the field
                $fieldName = $field;
-               if (is_array($TCA_DESCR[$key]['columns'][$field]) && isset($TCA_DESCR[$key]['columns'][$field]['alttitle'])) {
+               if (is_array($GLOBALS['TCA_DESCR'][$key]['columns'][$field]) && isset($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['alttitle'])) {
                                // If there's an alternative title, use it
-                       $fieldName = $TCA_DESCR[$key]['columns'][$field]['alttitle'];
+                       $fieldName = $GLOBALS['TCA_DESCR'][$key]['columns'][$field]['alttitle'];
                } elseif (isset($GLOBALS['TCA'][$key]) && isset($GLOBALS['TCA'][$key]['columns'][$field])) {
                                // Otherwise, if it's a table, use its title
                        $fieldName = $GLOBALS['TCA'][$key]['columns'][$field]['label'];
@@ -792,7 +779,6 @@ class SC_view_help {
         * @see getTableFieldNames()
         */
        function getTableFieldLabel($key, $field = '', $mergeToken = ': ') {
-               global $LANG;
                $tableName = '';
                $fieldName = '';
 
@@ -800,8 +786,8 @@ class SC_view_help {
                list($tableName, $fieldName) = $this->getTableFieldNames($key, $field);
 
                        // Create label:
-               $labelString = $LANG->sL($tableName) .
-                                       ($field ? $mergeToken . rtrim(trim($LANG->sL($fieldName)), ':') : '');
+               $labelString = $GLOBALS['LANG']->sL($tableName) .
+                                       ($field ? $mergeToken . rtrim(trim($GLOBALS['LANG']->sL($fieldName)), ':') : '');
 
                return $labelString;
        }
@@ -829,8 +815,6 @@ class SC_view_help {
         * @return      void
         */
        function createGlossaryIndex()  {
-               global $TCA_DESCR,$LANG;
-
                        // Create hash string and try to retrieve glossary array:
                $hash = md5('typo3/view_help.php:glossary');
                list($this->glossaryWords,$this->substWords) = unserialize(t3lib_BEfunc::getHash($hash));
@@ -841,17 +825,17 @@ class SC_view_help {
                                // Initialize:
                        $this->glossaryWords = array();
                        $this->substWords = array();
-                       $CSHkeys = array_flip(array_keys($TCA_DESCR));
+                       $CSHkeys = array_flip(array_keys($GLOBALS['TCA_DESCR']));
 
                                // Glossary
                        foreach($CSHkeys as $cshKey => $value)  {
                                if (t3lib_div::isFirstPartOfStr($cshKey, 'xGLOSSARY_') && !isset($GLOBALS['TCA'][$cshKey])) {
-                                       $LANG->loadSingleTableDescription($cshKey);
+                                       $GLOBALS['LANG']->loadSingleTableDescription($cshKey);
 
-                                       if (is_array($TCA_DESCR[$cshKey]['columns']))   {
+                                       if (is_array($GLOBALS['TCA_DESCR'][$cshKey]['columns']))        {
 
                                                        // Traverse table columns as listed in TCA_DESCR
-                                               foreach ($TCA_DESCR[$cshKey]['columns'] as $field => $data) {
+                                               foreach ($GLOBALS['TCA_DESCR'][$cshKey]['columns'] as $field => $data) {
                                                        if ($field)     {
                                                                $this->glossaryWords[$cshKey.'.'.$field] = array(
                                                                        'title' => trim($data['alttitle'] ? $data['alttitle'] : $cshKey),
index f00f624..6647d04 100644 (file)
  */
 
 
-$BACK_PATH = '';
+$GLOBALS['BACK_PATH'] = '';
 require('init.php');
 require('template.php');
-$LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
+$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_wizards.xml');
 
 /**
  * Script Class for colorpicker wizard
@@ -106,8 +106,6 @@ class SC_wizard_colorpicker {
         * @return      void
         */
        function init() {
-               global $BACK_PATH, $LANG;
-
                        // Setting GET vars (used in frameset script):
                $this->P = t3lib_div::_GP('P',1);
 
@@ -143,7 +141,7 @@ class SC_wizard_colorpicker {
 
                        // Initialize document object:
                $this->doc = t3lib_div::makeInstance('smallDoc');
-               $this->doc->backPath = $BACK_PATH;
+               $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->JScode = $this->doc->wrapScriptTags('
                        function checkReference()       {       //
                                if (parent.opener && parent.opener.document && parent.opener.document.'.$this->formName.' && parent.opener.document.'.$this->formName.'["'.$this->fieldName.'"])        {
@@ -176,7 +174,7 @@ class SC_wizard_colorpicker {
                ');
 
                        // Start page:
-               $this->content.=$this->doc->startPage($LANG->getLL('colorpicker_title'));
+               $this->content.=$this->doc->startPage($GLOBALS['LANG']->getLL('colorpicker_title'));
        }
 
        /**
@@ -185,8 +183,6 @@ class SC_wizard_colorpicker {
         * @return      void
         */
        function main() {
-               global $LANG;
-
                if(!t3lib_div::_GP('showPicker')) {     // Show frameset by default:
                        $this->frameSet();
                } else {
@@ -199,12 +195,12 @@ class SC_wizard_colorpicker {
                                        '.$this->colorImage().'
 
                                                <!-- Value box: -->
-                                       <p class="c-head">'.$LANG->getLL('colorpicker_colorValue',1).'</p>
+                                       <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_colorValue',1).'</p>
                                        <table border="0" cellpadding="0" cellspacing="3">
                                                <tr>
                                                        <td><input type="text" '.$this->doc->formWidth(7).' maxlength="10" name="colorValue" value="'.htmlspecialchars($this->colorValue).'" /></td>
-                                                       <td style="background-color:'.htmlspecialchars($this->colorValue).'; border: 1px solid black;">&nbsp;<span style="color: black;">'.$LANG->getLL('colorpicker_black',1).'</span>&nbsp;<span style="color: white;">'.$LANG->getLL('colorpicker_white',1).'</span>&nbsp;</td>
-                                                       <td><input type="submit" name="save_close" value="'.$LANG->getLL('colorpicker_setClose',1).'" /></td>
+                                                       <td style="background-color:'.htmlspecialchars($this->colorValue).'; border: 1px solid black;">&nbsp;<span style="color: black;">'.$GLOBALS['LANG']->getLL('colorpicker_black',1).'</span>&nbsp;<span style="color: white;">'.$GLOBALS['LANG']->getLL('colorpicker_white',1).'</span>&nbsp;</td>
+                                                       <td><input type="submit" name="save_close" value="'.$GLOBALS['LANG']->getLL('colorpicker_setClose',1).'" /></td>
                                                </tr>
                                        </table>
 
@@ -227,7 +223,7 @@ class SC_wizard_colorpicker {
                        }
 
                                // Output:
-                       $this->content.=$this->doc->section($LANG->getLL('colorpicker_title'), $content, 0,1);
+                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('colorpicker_title'), $content, 0,1);
                }
        }
 
@@ -250,8 +246,6 @@ class SC_wizard_colorpicker {
         * @return      void
         */
        function frameSet() {
-               global $LANG;
-
                        // Set doktype:
                $GLOBALS['TBE_TEMPLATE']->docType = 'xhtml_frames';
                $GLOBALS['TBE_TEMPLATE']->JScode = $GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
@@ -261,7 +255,7 @@ class SC_wizard_colorpicker {
                                }
                ');
 
-               $this->content = $GLOBALS['TBE_TEMPLATE']->startPage($LANG->getLL('colorpicker_title'));
+               $this->content = $GLOBALS['TBE_TEMPLATE']->startPage($GLOBALS['LANG']->getLL('colorpicker_title'));
 
                        // URL for the inner main frame:
                $url = 'wizard_colorpicker.php?showPicker=1'.
@@ -310,8 +304,6 @@ class SC_wizard_colorpicker {
         * @return      void
         */
        function colorMatrix()  {
-               global $LANG;
-
                $steps = 51;
 
                        // Get colors:
@@ -346,7 +338,7 @@ class SC_wizard_colorpicker {
                }
 
                $table = '
-                       <p class="c-head">'.$LANG->getLL('colorpicker_fromMatrix',1).'</p>
+                       <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_fromMatrix',1).'</p>
                        <table border="0" cellpadding="1" cellspacing="1" style="width:100%; border: 1px solid black; cursor:crosshair;">'.implode('',$tRows).'
                        </table>';
 
@@ -359,8 +351,6 @@ class SC_wizard_colorpicker {
         * @return      void
         */
        function colorList()    {
-               global $LANG;
-
                        // Initialize variables:
                $colors = explode(',',$this->HTMLcolorList);
                $currentValue = strtolower($this->colorValue);
@@ -374,7 +364,7 @@ class SC_wizard_colorpicker {
 
                        // Compile selector box and return result:
                $output = '
-                       <p class="c-head">'.$LANG->getLL('colorpicker_fromList',1).'</p>
+                       <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_fromList',1).'</p>
                        <select onchange="document.colorform.colorValue.value = this.options[this.selectedIndex].value; document.colorform.submit(); return false;">
                                '.implode('
                                ',$opt).'
@@ -389,8 +379,6 @@ class SC_wizard_colorpicker {
         * @return      void
         */
        function colorImage()   {
-               global $LANG;
-
                        // Handling color-picker image if any:
                if (!$this->imageError) {
                        if ($this->pickerImage) {
@@ -398,7 +386,7 @@ class SC_wizard_colorpicker {
                                        $this->colorValue = '#'.$this->getIndex(t3lib_stdgraphic::imageCreateFromFile($this->pickerImage),t3lib_div::_POST('coords_x'),t3lib_div::_POST('coords_y'));
                                }
                                $pickerFormImage = '
-                               <p class="c-head">'.$LANG->getLL('colorpicker_fromImage',1).'</p>
+                               <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_fromImage',1).'</p>
                                <input type="image" src="../'.substr($this->pickerImage,strlen(PATH_site)).'" name="coords" style="cursor:crosshair;" /><br />';
                        } else {
                                $pickerFormImage = '';
index 867667c..6cf678a 100644 (file)
@@ -62,7 +62,7 @@
 $BACK_PATH='';
 require ('init.php');
 require ('template.php');
-$LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
+$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_wizards.xml');
 
 
 
@@ -424,17 +424,15 @@ class SC_wizard_forms {
         * @access private
         */
        function getFormHTML($formCfgArray,$row)        {
-               global $LANG;
-
                        // Initialize variables:
                $specParts=array();
                $hiddenFields=array();
                $tRows=array();
 
                        // Set header row:
-               $cells=array($LANG->getLL('forms_preview',1).':',
-                                               $LANG->getLL('forms_element',1).':',
-                                               $LANG->getLL('forms_config',1).':',
+               $cells=array($GLOBALS['LANG']->getLL('forms_preview',1).':',
+                                               $GLOBALS['LANG']->getLL('forms_element',1).':',
+                                               $GLOBALS['LANG']->getLL('forms_config',1).':',
                );
                $tRows[]='
                        <tr class="bgColor2" id="typo3-formWizardHeader">
@@ -471,9 +469,9 @@ class SC_wizard_forms {
                                        $types = explode(',','input,textarea,select,check,radio,password,file,hidden,submit,property,label');
                                        foreach($types as $t)   {
                                                $opt[]='
-                                                               <option value="'.$t.'"'.($confData['type']==$t?' selected="selected"':'').'>'.$LANG->getLL('forms_type_'.$t,1).'</option>';
+                                                               <option value="'.$t.'"'.($confData['type']==$t?' selected="selected"':'').'>'.$GLOBALS['LANG']->getLL('forms_type_'.$t,1).'</option>';
                                        }
-                                       $temp_cells[$LANG->getLL('forms_type')]='
+                                       $temp_cells[$GLOBALS['LANG']->getLL('forms_type')]='
                                                        <select name="FORMCFG[c]['.(($k+1)*2).'][type]">
                                                                '.implode('
                                                                ',$opt).'
@@ -481,12 +479,12 @@ class SC_wizard_forms {
 
                                                // Title field:
                                        if (!t3lib_div::inList('hidden,submit',$confData['type']))      {
-                                               $temp_cells[$LANG->getLL('forms_label')]='<input type="text"'.$this->doc->formWidth(15).' name="FORMCFG[c]['.(($k+1)*2).'][label]" value="'.htmlspecialchars($confData['label']).'" />';
+                                               $temp_cells[$GLOBALS['LANG']->getLL('forms_label')]='<input type="text"'.$this->doc->formWidth(15).' name="FORMCFG[c]['.(($k+1)*2).'][label]" value="'.htmlspecialchars($confData['label']).'" />';
                                        }
 
                                                // Required checkbox:
                                        if (!t3lib_div::inList('check,hidden,submit,label',$confData['type']))          {
-                                               $temp_cells[$LANG->getLL('forms_required')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][required]" value="1"'.($confData['required']?' checked="checked"':'').' title="'.$LANG->getLL('forms_required',1).'" />';
+                                               $temp_cells[$GLOBALS['LANG']->getLL('forms_required')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][required]" value="1"'.($confData['required']?' checked="checked"':'').' title="'.$GLOBALS['LANG']->getLL('forms_required',1).'" />';
                                        }
 
                                                // Put sub-items together into table cell:
@@ -501,28 +499,28 @@ class SC_wizard_forms {
                                                $confData['fieldname'] = 'attachment'.(++$this->attachmentCounter);
                                        }
                                        if (!t3lib_div::inList('label',$confData['type']))      {
-                                               $temp_cells[$LANG->getLL('forms_fieldName')]='<input type="text"'.$this->doc->formWidth(10).' name="FORMCFG[c]['.(($k+1)*2).'][fieldname]" value="'.htmlspecialchars($confData['fieldname']).'" title="'.$LANG->getLL('forms_fieldName',1).'" />';
+                                               $temp_cells[$GLOBALS['LANG']->getLL('forms_fieldName')]='<input type="text"'.$this->doc->formWidth(10).' name="FORMCFG[c]['.(($k+1)*2).'][fieldname]" value="'.htmlspecialchars($confData['fieldname']).'" title="'.$GLOBALS['LANG']->getLL('forms_fieldName',1).'" />';
                                        }
 
                                                // Field configuration depending on the fields type:
                                        switch((string)$confData['type'])       {
                                                case 'textarea':
-                                                       $temp_cells[$LANG->getLL('forms_cols')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][cols]" value="'.htmlspecialchars($confData['cols']).'" title="'.$LANG->getLL('forms_cols',1).'" />';
-                                                       $temp_cells[$LANG->getLL('forms_rows')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][rows]" value="'.htmlspecialchars($confData['rows']).'" title="'.$LANG->getLL('forms_rows',1).'" />';
-                                                       $temp_cells[$LANG->getLL('forms_extra')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][extra]" value="OFF"'.($confData['extra']=='OFF'?' checked="checked"':'').' title="'.$LANG->getLL('forms_extra',1).'" />';
+                                                       $temp_cells[$GLOBALS['LANG']->getLL('forms_cols')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][cols]" value="'.htmlspecialchars($confData['cols']).'" title="'.$GLOBALS['LANG']->getLL('forms_cols',1).'" />';
+                                                       $temp_cells[$GLOBALS['LANG']->getLL('forms_rows')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][rows]" value="'.htmlspecialchars($confData['rows']).'" title="'.$GLOBALS['LANG']->getLL('forms_rows',1).'" />';
+                                                       $temp_cells[$GLOBALS['LANG']->getLL('forms_extra')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][extra]" value="OFF"'.($confData['extra']=='OFF'?' checked="checked"':'').' title="'.$GLOBALS['LANG']->getLL('forms_extra',1).'" />';
                                                break;
                                                case 'input':
                                                case 'password':
-                                                       $temp_cells[$LANG->getLL('forms_size')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][size]" value="'.htmlspecialchars($confData['size']).'" title="'.$LANG->getLL('forms_size',1).'" />';
-                                                       $temp_cells[$LANG->getLL('forms_max')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][max]" value="'.htmlspecialchars($confData['max']).'" title="'.$LANG->getLL('forms_max',1).'" />';
+                                                       $temp_cells[$GLOBALS['LANG']->getLL('forms_size')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][size]" value="'.htmlspecialchars($confData['size']).'" title="'.$GLOBALS['LANG']->getLL('forms_size',1).'" />';
+                                                       $temp_cells[$GLOBALS['LANG']->getLL('forms_max')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][max]" value="'.htmlspecialchars($confData['max']).'" title="'.$GLOBALS['LANG']->getLL('forms_max',1).'" />';
                                                break;
                                                case 'file':
-                                                       $temp_cells[$LANG->getLL('forms_size')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][size]" value="'.htmlspecialchars($confData['size']).'" title="'.$LANG->getLL('forms_size',1).'" />';
+                                                       $temp_cells[$GLOBALS['LANG']->getLL('forms_size')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][size]" value="'.htmlspecialchars($confData['size']).'" title="'.$GLOBALS['LANG']->getLL('forms_size',1).'" />';
                                                break;
                                                case 'select':
-                                                       $temp_cells[$LANG->getLL('forms_size')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][size]" value="'.htmlspecialchars($confData['size']).'" title="'.$LANG->getLL('forms_size',1).'" />';
-                                                       $temp_cells[$LANG->getLL('forms_autosize')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][autosize]" value="1"'.($confData['autosize']?' checked="checked"':'').' title="'.$LANG->getLL('forms_autosize',1).'" />';
-                                                       $temp_cells[$LANG->getLL('forms_multiple')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][multiple]" value="1"'.($confData['multiple']?' checked="checked"':'').' title="'.$LANG->getLL('forms_multiple',1).'" />';
+                                                       $temp_cells[$GLOBALS['LANG']->getLL('forms_size')]='<input type="text"'.$this->doc->formWidth(5).' name="FORMCFG[c]['.(($k+1)*2).'][size]" value="'.htmlspecialchars($confData['size']).'" title="'.$GLOBALS['LANG']->getLL('forms_size',1).'" />';
+                                                       $temp_cells[$GLOBALS['LANG']->getLL('forms_autosize')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][autosize]" value="1"'.($confData['autosize']?' checked="checked"':'').' title="'.$GLOBALS['LANG']->getLL('forms_autosize',1).'" />';
+                                                       $temp_cells[$GLOBALS['LANG']->getLL('forms_multiple')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][multiple]" value="1"'.($confData['multiple']?' checked="checked"':'').' title="'.$GLOBALS['LANG']->getLL('forms_multiple',1).'" />';
                                                break;
                                        }
 
@@ -539,11 +537,11 @@ class SC_wizard_forms {
 
                                                // Default data
                                        if ($confData['type']=='select' || $confData['type']=='radio')  {
-                                               $temp_cells[$LANG->getLL('forms_options')]='<textarea '.$this->doc->formWidthText(15).' rows="4" name="FORMCFG[c]['.(($k+1)*2).'][options]" title="'.$LANG->getLL('forms_options',1).'">'.t3lib_div::formatForTextarea($confData['default']).'</textarea>';
+                                               $temp_cells[$GLOBALS['LANG']->getLL('forms_options')]='<textarea '.$this->doc->formWidthText(15).' rows="4" name="FORMCFG[c]['.(($k+1)*2).'][options]" title="'.$GLOBALS['LANG']->getLL('forms_options',1).'">'.t3lib_div::formatForTextarea($confData['default']).'</textarea>';
                                        } elseif ($confData['type']=='check')   {
-                                               $temp_cells[$LANG->getLL('forms_checked')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][default]" value="1"'.(trim($confData['default'])?' checked="checked"':'').' title="'.$LANG->getLL('forms_checked',1).'" />';
+                                               $temp_cells[$GLOBALS['LANG']->getLL('forms_checked')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][default]" value="1"'.(trim($confData['default'])?' checked="checked"':'').' title="'.$GLOBALS['LANG']->getLL('forms_checked',1).'" />';
                                        } elseif ($confData['type'] && $confData['type']!='file') {
-                                               $temp_cells[$LANG->getLL('forms_default')]='<input type="text"'.$this->doc->formWidth(15).' name="FORMCFG[c]['.(($k+1)*2).'][default]" value="'.htmlspecialchars($confData['default']).'" title="'.$LANG->getLL('forms_default',1).'" />';
+                                               $temp_cells[$GLOBALS['LANG']->getLL('forms_default')]='<input type="text"'.$this->doc->formWidth(15).' name="FORMCFG[c]['.(($k+1)*2).'][default]" value="'.htmlspecialchars($confData['default']).'" title="'.$GLOBALS['LANG']->getLL('forms_default',1).'" />';
                                        }
 
                                        $cells[]=$confData['type']?$this->formatCells($temp_cells):'';
@@ -555,18 +553,18 @@ class SC_wizard_forms {
 // FIXME $inputStyle undefined
                                        $brTag=$inputStyle?'':'<br />';
                                        if ($k!=0)      {
-                                               $ctrl.='<input type="image" name="FORMCFG[row_up]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2up.gif','').$onClick.' title="'.$LANG->getLL('table_up',1).'" />'.$brTag;
+                                               $ctrl.='<input type="image" name="FORMCFG[row_up]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2up.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_up',1).'" />'.$brTag;
                                        } else {
-                                               $ctrl.='<input type="image" name="FORMCFG[row_bottom]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_up.gif','').$onClick.' title="'.$LANG->getLL('table_bottom',1).'" />'.$brTag;
+                                               $ctrl.='<input type="image" name="FORMCFG[row_bottom]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_up.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_bottom',1).'" />'.$brTag;
                                        }
-                                       $ctrl.='<input type="image" name="FORMCFG[row_remove]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','').$onClick.' title="'.$LANG->getLL('table_removeRow',1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="FORMCFG[row_remove]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_removeRow',1).'" />'.$brTag;
 // FIXME $tLines undefined
                                        if (($k+1)!=count($tLines))     {
-                                               $ctrl.='<input type="image" name="FORMCFG[row_down]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2down.gif','').$onClick.' title="'.$LANG->getLL('table_down',1).'" />'.$brTag;
+                                               $ctrl.='<input type="image" name="FORMCFG[row_down]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2down.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_down',1).'" />'.$brTag;
                                        } else {
-                                               $ctrl.='<input type="image" name="FORMCFG[row_top]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_down.gif','').$onClick.' title="'.$LANG->getLL('table_top',1).'" />'.$brTag;
+                                               $ctrl.='<input type="image" name="FORMCFG[row_top]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_down.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_top',1).'" />'.$brTag;
                                        }
-                                       $ctrl.='<input type="image" name="FORMCFG[row_add]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/add.gif','').$onClick.' title="'.$LANG->getLL('table_addRow',1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="FORMCFG[row_add]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/add.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_addRow',1).'" />'.$brTag;
 
                                        $ctrl='<span class="c-wizButtonsV">'.$ctrl.'</span>';
 
@@ -600,7 +598,7 @@ class SC_wizard_forms {
                        $tRows[]='
                                <tr>
                                        <td colspan="2" class="bgColor2">&nbsp;</td>
-                                       <td colspan="2" class="bgColor2"><strong>'.$LANG->getLL('forms_special_eform',1).':</strong>'.
+                                       <td colspan="2" class="bgColor2"><strong>'.$GLOBALS['LANG']->getLL('forms_special_eform',1).':</strong>'.
                                                t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'wizard_forms_wiz_formmail_info', $GLOBALS['BACK_PATH'],'').
                                                '</td>
                                </tr>';
@@ -610,7 +608,7 @@ class SC_wizard_forms {
                                <tr class="bgColor5">
                                        <td>&nbsp;</td>
                                        <td class="bgColor4">&nbsp;</td>
-                                       <td>'.$LANG->getLL('forms_eform_formtype_mail',1).':</td>
+                                       <td>'.$GLOBALS['LANG']->getLL('forms_eform_formtype_mail',1).':</td>
                                        <td>
                                                <input type="hidden" name="FORMCFG[c]['.(1000*2).'][fieldname]" value="formtype_mail" />
                                                <input type="hidden" name="FORMCFG[c]['.(1000*2).'][type]" value="submit" />
@@ -623,7 +621,7 @@ class SC_wizard_forms {
                                <tr class="bgColor5">
                                        <td>&nbsp;</td>
                                        <td class="bgColor4">&nbsp;</td>
-                                       <td>'.$LANG->getLL('forms_eform_html_enabled',1).':</td>
+                                       <td>'.$GLOBALS['LANG']->getLL('forms_eform_html_enabled',1).':</td>
                                        <td>
                                                <input type="hidden" name="FORMCFG[c]['.(1001*2).'][fieldname]" value="html_enabled" />
                                                <input type="hidden" name="FORMCFG[c]['.(1001*2).'][type]" value="hidden" />
@@ -636,7 +634,7 @@ class SC_wizard_forms {
                                <tr class="bgColor5">
                                        <td>&nbsp;</td>
                                        <td class="bgColor4">&nbsp;</td>
-                                       <td>'.$LANG->getLL('forms_eform_subject',1).':</td>
+                                       <td>'.$GLOBALS['LANG']->getLL('forms_eform_subject',1).':</td>
                                        <td>
                                                <input type="hidden" name="FORMCFG[c]['.(1002*2).'][fieldname]" value="subject" />
                                                <input type="hidden" name="FORMCFG[c]['.(1002*2).'][type]" value="hidden" />
@@ -649,7 +647,7 @@ class SC_wizard_forms {
                                <tr class="bgColor5">
                                        <td>&nbsp;</td>
                                        <td class="bgColor4">&nbsp;</td>
-                                       <td>'.$LANG->getLL('forms_eform_recipient',1).':</td>
+                                       <td>'.$GLOBALS['LANG']->getLL('forms_eform_recipient',1).':</td>
                                        <td>
                                                <input type="text"'.$this->doc->formWidth(15).' name="FORMCFG[recipient]" value="'.htmlspecialchars($row['subheader']).'" />
                                        </td>
index 3b9d26e..e32ea0e 100644 (file)
@@ -53,7 +53,7 @@
 $BACK_PATH='';
 require ('init.php');
 require ('template.php');
-$LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
+$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_wizards.xml');
 
 t3lib_BEfunc::lockRecords();
 
@@ -121,8 +121,6 @@ class SC_wizard_rte {
         * @return      void
         */
        function main() {
-               global $LANG;
-
                        // translate id to the workspace version:
                if ($versionRec = t3lib_BEfunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $this->P['table'], $this->P['uid'], 'uid')) {
                        $this->P['uid'] = $versionRec['uid'];
@@ -207,7 +205,7 @@ class SC_wizard_rte {
                                $tceforms->printNeededJSFunctions();
                } else {
                                // ERROR:
-                       $this->content.=$this->doc->section($LANG->getLL('forms_title'),'<span class="typo3-red">'.$LANG->getLL('table_noData',1).'</span>',0,1);
+                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('forms_title'),'<span class="typo3-red">'.$GLOBALS['LANG']->getLL('table_noData',1).'</span>',0,1);
                }
 
                // Setting up the buttons and markers for docheader
index a81e4e8..6ee3399 100644 (file)
@@ -61,7 +61,7 @@
 $BACK_PATH='';
 require ('init.php');
 require ('template.php');
-$LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
+$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_wizards.xml');
 
 
 
@@ -341,8 +341,6 @@ class SC_wizard_table {
         * @access private
         */
        function getTableHTML($cfgArr,$row)     {
-               global $LANG;
-
                        // Traverse the rows:
                $tRows=array();
                $k=0;
@@ -372,19 +370,19 @@ class SC_wizard_table {
 
                                $brTag=$this->inputStyle?'':'<br />';
                                if ($k!=0)      {
-                                       $ctrl.='<input type="image" name="TABLE[row_up]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2up.gif','').$onClick.' title="'.$LANG->getLL('table_up',1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="TABLE[row_up]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2up.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_up',1).'" />'.$brTag;
                                } else {
-                                       $ctrl.='<input type="image" name="TABLE[row_bottom]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_up.gif','').$onClick.' title="'.$LANG->getLL('table_bottom',1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="TABLE[row_bottom]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_up.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_bottom',1).'" />'.$brTag;
                                }
-                               $ctrl.='<input type="image" name="TABLE[row_remove]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','').$onClick.' title="'.$LANG->getLL('table_removeRow',1).'" />'.$brTag;
+                               $ctrl.='<input type="image" name="TABLE[row_remove]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_removeRow',1).'" />'.$brTag;
 
 // FIXME what is $tLines? See wizard_forms.php for the same.
                                if (($k+1)!=count($tLines))     {
-                                       $ctrl.='<input type="image" name="TABLE[row_down]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2down.gif','').$onClick.' title="'.$LANG->getLL('table_down',1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="TABLE[row_down]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2down.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_down',1).'" />'.$brTag;
                                } else {
-                                       $ctrl.='<input type="image" name="TABLE[row_top]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_down.gif','').$onClick.' title="'.$LANG->getLL('table_top',1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="TABLE[row_top]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_down.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_top',1).'" />'.$brTag;
                                }
-                               $ctrl.='<input type="image" name="TABLE[row_add]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/add.gif','').$onClick.' title="'.$LANG->getLL('table_addRow',1).'" />'.$brTag;
+                               $ctrl.='<input type="image" name="TABLE[row_add]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/add.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_addRow',1).'" />'.$brTag;
 
                                $tRows[]='
                                        <tr class="bgColor4">
@@ -413,17 +411,17 @@ class SC_wizard_table {
                        foreach($firstRow as $temp)     {
                                $ctrl='';
                                if ($a!=0)      {
-                                       $ctrl.='<input type="image" name="TABLE[col_left]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2left.gif','').' title="'.$LANG->getLL('table_left',1).'" />';
+                                       $ctrl.='<input type="image" name="TABLE[col_left]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2left.gif','').' title="'.$GLOBALS['LANG']->getLL('table_left',1).'" />';
                                } else {
-                                       $ctrl.='<input type="image" name="TABLE[col_end]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_left.gif','').' title="'.$LANG->getLL('table_end',1).'" />';
+                                       $ctrl.='<input type="image" name="TABLE[col_end]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_left.gif','').' title="'.$GLOBALS['LANG']->getLL('table_end',1).'" />';
                                }
-                               $ctrl.='<input type="image" name="TABLE[col_remove]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','').' title="'.$LANG->getLL('table_removeColumn',1).'" />';
+                               $ctrl.='<input type="image" name="TABLE[col_remove]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','').' title="'.$GLOBALS['LANG']->getLL('table_removeColumn',1).'" />';
                                if (($a+1)!=$cols)      {
-                                       $ctrl.='<input type="image" name="TABLE[col_right]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2right.gif','').' title="'.$LANG->getLL('table_right',1).'" />';
+                                       $ctrl.='<input type="image" name="TABLE[col_right]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2right.gif','').' title="'.$GLOBALS['LANG']->getLL('table_right',1).'" />';
                                } else {
-                                       $ctrl.='<input type="image" name="TABLE[col_start]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_right.gif','').' title="'.$LANG->getLL('table_start',1).'" />';
+                                       $ctrl.='<input type="image" name="TABLE[col_start]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_right.gif','').' title="'.$GLOBALS['LANG']->getLL('table_start',1).'" />';
                                }
-                               $ctrl.='<input type="image" name="TABLE[col_add]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/add.gif','').' title="'.$LANG->getLL('table_addColumn',1).'" />';
+                               $ctrl.='<input type="image" name="TABLE[col_add]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/add.gif','').' title="'.$GLOBALS['LANG']->getLL('table_addColumn',1).'" />';
                                $cells[]='<span class="c-wizButtonsH">'.$ctrl.'</span>';
 
                                        // Incr. counter:
@@ -459,7 +457,7 @@ class SC_wizard_table {
                                '.
                                '<input type="hidden" name="TABLE[textFields]" value="0" />'.
                                '<input type="checkbox" name="TABLE[textFields]" id="textFields" value="1"'.($this->inputStyle?' checked="checked"':'').' /> <label for="textFields">'.
-                               $LANG->getLL('table_smallFields').'</label>
+                               $GLOBALS['LANG']->getLL('table_smallFields').'</label>
                        </div>
 
                        <br /><br />
index 1bcf114..dc4218d 100644 (file)
 
 
 
-$BACK_PATH='';
+$GLOBALS['BACK_PATH']='';
 require ('init.php');
 require ('template.php');
-$LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
+$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_wizards.xml');
 
 
 
@@ -143,8 +143,6 @@ class SC_wizard_tsconfig {
         * @return      void
         */
        function init() {
-               global $LANG,$BACK_PATH;
-
                        // Check if the tsconfig_help extension is loaded - which is mandatory for this wizard to work.
                t3lib_extMgm::isLoaded('tsconfig_help',1);
 
@@ -167,7 +165,7 @@ class SC_wizard_tsconfig {
 
                        // Init the document table object:
                $this->doc = t3lib_div::makeInstance('template');
-               $this->doc->backPath = $BACK_PATH;
+               $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->form='<form action="" name="editform">';
 
                        // Adding Styles (should go into stylesheet?)
@@ -285,7 +283,7 @@ class SC_wizard_tsconfig {
 
 
                        // Start the page:
-               $this->content.=$this->doc->startPage($LANG->getLL('tsprop'));
+               $this->content.=$this->doc->startPage($GLOBALS['LANG']->getLL('tsprop'));
        }
 
        /**
@@ -294,21 +292,19 @@ class SC_wizard_tsconfig {
         * @return      void
         */
        function main() {
-               global $LANG;
-
                        // Adding module content:
-               $this->content.=$this->doc->section($LANG->getLL('tsprop'),$this->browseTSprop($this->mode,$this->show),0,1);
+               $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('tsprop'),$this->browseTSprop($this->mode,$this->show),0,1);
 
                        // Adding link to TSref:
                if ($this->mode=='tsref')       {
-                       $this->content.=$this->doc->section($LANG->getLL('tsprop_TSref'),'
-                       <a href="'. TYPO3_URL_DOCUMENTATION_TSREF.'" target="_blank">'.$LANG->getLL('tsprop_TSref',1).'</a>
+                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('tsprop_TSref'),'
+                       <a href="'. TYPO3_URL_DOCUMENTATION_TSREF.'" target="_blank">'.$GLOBALS['LANG']->getLL('tsprop_TSref',1).'</a>
                        ',0,1);
                }
                        // Adding link to admin guides etc:
                if ($this->mode=='page' || $this->mode=='beuser')       {
-                       $this->content.=$this->doc->section($LANG->getLL('tsprop_tsconfig'),'
-                       <a href="' . TYPO3_URL_DOCUMENTATION_TSCONFIG . '" target="_blank">' . $LANG->getLL('tsprop_tsconfig',1) . '</a>
+                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('tsprop_tsconfig'),'
+                       <a href="' . TYPO3_URL_DOCUMENTATION_TSCONFIG . '" target="_blank">' . $GLOBALS['LANG']->getLL('tsprop_tsconfig',1) . '</a>
                        ',0,1);
                }
        }
@@ -332,8 +328,6 @@ class SC_wizard_tsconfig {
         * @return      string          HTML
         */
        function browseTSprop($mode,$show)      {
-               global $LANG;
-
                        // Get object tree:
                $objTree = $this->getObjTree();
 
@@ -361,10 +355,10 @@ class SC_wizard_tsconfig {
                                // Printing the "mixer-field":
                        if (!$this->onlyProperty)       {
                                $links=array();
-                               $links[]='<a href="#" onclick="mixerField(\'Indent\');return false;">'.$LANG->getLL('tsprop_mixer_indent',1).'</a>';
-                               $links[]='<a href="#" onclick="mixerField(\'Outdent\');return false;">'.$LANG->getLL('tsprop_mixer_outdent',1).'</a>';
-                               $links[]='<a href="#" onclick="mixerField(\'Wrap\',unescape(\''.rawurlencode($obj_string).'\'));return false;">'.$LANG->getLL('tsprop_mixer_wrap',1).'</a>';
-                               $links[]='<a href="#" onclick="mixerField(\'Transfer\');return false;">'.$LANG->getLL('tsprop_mixer_transfer',1).'</a>';
+                               $links[]='<a href="#" onclick="mixerField(\'Indent\');return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_indent',1).'</a>';
+                               $links[]='<a href="#" onclick="mixerField(\'Outdent\');return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_outdent',1).'</a>';
+                               $links[]='<a href="#" onclick="mixerField(\'Wrap\',unescape(\''.rawurlencode($obj_string).'\'));return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_wrap',1).'</a>';
+                               $links[]='<a href="#" onclick="mixerField(\'Transfer\');return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_transfer',1).'</a>';
                                $out.='<textarea rows="5" name="mixer" wrap="off"'.$this->doc->formWidthText(48,'','off').' class="fixed-font enable-tab"></textarea>';
                                $out.='<br /><strong>'.implode('&nbsp; | &nbsp;',$links).'</strong>';
                                $out.='<hr />';