[TASK] Remove old login labels
[Packages/TYPO3.CMS.git] / typo3 / view_help.php
index 6a9a0a3..777cb57 100644 (file)
  *
  * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-/**
- * [CLASS/FUNCTION INDEX of SCRIPT]
- *
- *
- *
- *   91: class local_t3lib_parsehtml extends t3lib_parsehtml
- *  102:     function processContent($value,$dir,$conf)
- *
- *
- *  122: class SC_view_help
- *  146:     function init()
- *  167:     function main()
- *  198:     function printContent()
- *
- *              SECTION: Rendering main modes
- *  221:     function render_TOC()
- *  338:     function render_TOC_el($table, $tocCat, &$outputSections, &$tocArray, &$CSHkeys)
- *  370:     function render_TOC_makeTocList($tocArray)
- *  409:     function render_Table($table)
- *  469:     function render_Single($table,$field)
- *
- *              SECTION: Rendering CSH items
- *  515:     function make_seeAlso($value,$anchorTable='')
- *  564:     function printImage($images,$descr)
- *  599:     function headerLine($str,$type=0)
- *  620:     function prepareContent($str)
- *  635:     function printItem($table,$field,$anchors=0)
- *  668:     function getTableFieldNames($table,$field)
- *  691:     function getTableFieldLabel($table,$field='',$mergeToken=': ')
- *
- *              SECTION: Glossary related
- *  726:     function createGlossaryIndex()
- *  785:     function substituteGlossaryWords($code)
- *  801:     function substituteGlossaryWords_htmlcleaner_callback($code)
- *
- * TOTAL FUNCTIONS: 19
- * (This index is automatically created/updated by the extension "extdeveval")
- *
- */
 
 require('init.php');
 require('template.php');
-$LANG->includeLLFile('EXT:lang/locallang_view_help.xml');
+$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_view_help.xml');
 
 
 /**
@@ -120,7 +81,7 @@ class SC_view_help {
        var $allowedHTML = '<strong><em><b><i>';
 
                // For these vars, see init()
-       var $limitAccess;       // If set access to fields and tables is checked. Should be done for true database tables.
+       var $limitAccess;       // If set access to fields and tables is checked. Should be done for TRUE database tables.
        var $table;                     // The "table" key
        var $field;                     // The "field" key
                /**
@@ -221,7 +182,7 @@ class SC_view_help {
                        $this->content .= $this->render_Single($this->mainKey, $this->field);
 
                } elseif (is_array($this->ffID)) {
-                       $this->content .= $this->render_SingleFlex();
+                       $this->content .= $this->render_Single($this->mainKey, $this->field);
 
                } else {
                                // Render Table Of Contents if nothing else:
@@ -229,7 +190,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 +226,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 +235,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 +244,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 +252,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 +262,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 +271,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 +279,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 +287,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 +297,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 +342,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 +349,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 +372,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 +380,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>
@@ -454,24 +409,27 @@ class SC_view_help {
         * @param string $table CSH key / table name
         * @return string HTML output
         */
-       function render_Table($key, $table) {
-               global $TCA_DESCR,$LANG;
-
+       function render_Table($key, $table = NULL) {
                $output = '';
 
+                       // take default key if not explicitly specified
+               if ($table === NULL) {
+                       $table = $key;
+               }
+
                        // 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 +453,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.'
@@ -536,27 +494,6 @@ class SC_view_help {
                return $output;
        }
 
-
-       /**
-        * Renders CSH for a single field.
-        *
-        * @param       string          CSH key / table name
-        * @param       string          Sub key / field name
-        * @return      string          HTML output
-        * @deprecated since TYPO3 4.5, this function will be removed in TYPO3 4.7. Use render_Single() instead.
-        */
-       function render_SingleFlex() {
-               t3lib_div::logDeprecatedFunction();
-               $output = '';
-
-                       // Render
-               $output.= $this->printItemFlex();
-
-                       // Substitute glossary words:
-               return $this->substituteGlossaryWords($output);
-       }
-
-
        /************************************
         *
         * Rendering CSH items
@@ -571,8 +508,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 +533,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],' / ');
@@ -637,7 +572,7 @@ class SC_view_help {
                                                $imgFile = '../'.$imgFile;
                                                $code.= '<br /><img src="'.$imgFile.'" '.$imgInfo[3].' class="c-inlineimg" alt="" /><br />
                                                ';
-                                               $code.= '<p><em>'.$GLOBALS['LANG']->hscAndCharConv($descr,1).'</em></p>
+                                               $code.= '<p><em>' . htmlspecialchars($descr) . '</em></p>
                                                ';
                                        } else $code.= '<div style="background-color: red; border: 1px solid black; color: white;">NOT AN IMAGE: '.$imgFile.'</div>';
                                } else $code.= '<div style="background-color: red; border: 1px solid black; color: white;">IMAGE FILE NOT FOUND: '.$image.'</div>';
@@ -676,7 +611,6 @@ class SC_view_help {
         * @return      string          Formatted content.
         */
        function prepareContent($str)   {
-               $str = $GLOBALS['LANG']->hscAndCharConv($str,0);
                return '<p>'.nl2br(trim(strip_tags($str,$this->allowedHTML))).'</p>
                ';
        }
@@ -691,62 +625,30 @@ 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;
        }
 
        /**
-        * Prints a single $table/$field information piece
-        * If $anchors is set, then seeAlso references to the same table will be page-anchors, not links.
-        *
-        * @param       string          Table name
-        * @param       string          Field name
-        * @param       boolean         If anchors is to be shown.
-        * @return      string          HTML content
-        * @deprecated since TYPO3 4.5, this function will be removed in TYPO3 4.7. Use printItem() instead.
-        */
-       function printItemFlex() {
-               t3lib_div::logDeprecatedFunction();
-               // Get all texts
-               foreach (explode(',', 'description,details,syntax,image,image_descr,seeAlso') as $var) {
-                       // Double $ below is not a error!
-                       $$var = $GLOBALS['LANG']->sL($this->ffID['cshFile'] . ':' . $this->ffID['field'] . '.' . $var);
-               }
-               // Make seeAlso references.
-               $seeAlsoRes = $this->make_seeAlso($seeAlso);
-
-                       // Making item:
-               $out= $this->headerLine($this->ffID['title'], 1) .
-                               $this->prepareContent($description) .
-                               ($details ? $this->headerLine($GLOBALS['LANG']->getLL('details').':') . $this->prepareContent($details) : '') .
-                               ($syntax ? $this->headerLine($GLOBALS['LANG']->getLL('syntax').':') . $this->prepareContent($syntax) : '') .
-                               ($image ? $this->printImage($image, $image_descr) : '') .
-                               ($seeAlso && $seeAlsoRes ? $this->headerLine($GLOBALS['LANG']->getLL('seeAlso').':').'<p>'.$seeAlsoRes.'</p>' : '') .
-               '<br />';
-               return $out;
-       }
-
-       /**
         * Returns labels for a given field in a given structure
         *
         * @param string $key CSH key / table name
@@ -754,15 +656,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 +672,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 +692,6 @@ class SC_view_help {
         * @see getTableFieldNames()
         */
        function getTableFieldLabel($key, $field = '', $mergeToken = ': ') {
-               global $LANG;
                $tableName = '';
                $fieldName = '';
 
@@ -800,8 +699,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 +728,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 +738,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),
@@ -941,4 +838,4 @@ $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
+?>
\ No newline at end of file