[CLEANUP] Remove all occurrences of edit_showFieldHelp == 'text'
authorMarkus Klein <klein.t3@mfc-linz.at>
Sat, 22 Sep 2012 20:56:01 +0000 (22:56 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 22 Sep 2012 22:15:01 +0000 (00:15 +0200)
The text version of edit_showFieldHelp is not supported since 4.5
anymore. This patch removes all references and dead code.

Resolves: #24623
Releases: 6.0

Change-Id: Idb915f4dbaba8ee0690c06fddcace4d0d4ad6813
Reviewed-on: http://review.typo3.org/14950
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Form/Element/InlineElement.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/feedit/Classes/FrontendEditPanel.php
typo3/sysext/t3editor/res/jslib/parse_typoscript/tokenizetyposcript.js

index 070c5fd..d640126 100644 (file)
@@ -709,9 +709,6 @@ class PageLayoutController {
                                $tceforms->clipObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Clipboard\\Clipboard');
                                // Initialize - reads the clipboard content from the user session
                                $tceforms->clipObj->initializeClipboard();
-                               if ($GLOBALS['BE_USER']->uc['edit_showFieldHelp'] !== 'text' && $this->MOD_SETTINGS['showDescriptions']) {
-                                       $tceforms->edit_showFieldHelp = 'text';
-                               }
                                // Render form, wrap it:
                                $panel = '';
                                $panel .= $tceforms->getMainFields($this->eRParts[0], $rec);
@@ -745,7 +742,7 @@ class PageLayoutController {
                $q_count = $this->getNumberOfHiddenElements();
                $h_func_b = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[tt_content_showHidden]', $this->MOD_SETTINGS['tt_content_showHidden'], 'db_layout.php', '', 'id="checkTt_content_showHidden"') . '<label for="checkTt_content_showHidden">' . (!$q_count ? $GLOBALS['TBE_TEMPLATE']->dfw($GLOBALS['LANG']->getLL('hiddenCE', 1)) : $GLOBALS['LANG']->getLL('hiddenCE', 1) . ' (' . $q_count . ')') . '</label>';
                $h_func_b .= '<br />' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[showPalettes]', $this->MOD_SETTINGS['showPalettes'], 'db_layout.php', '', 'id="checkShowPalettes"') . '<label for="checkShowPalettes">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPalettes', 1) . '</label>';
-               if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('context_help') && $GLOBALS['BE_USER']->uc['edit_showFieldHelp'] !== 'text') {
+               if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('context_help')) {
                        $h_func_b .= '<br />' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[showDescriptions]', $this->MOD_SETTINGS['showDescriptions'], 'db_layout.php', '', 'id="checkShowDescriptions"') . '<label for="checkShowDescriptions">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showDescriptions', 1) . '</label>';
                }
                if ($GLOBALS['BE_USER']->isRTE()) {
@@ -1059,4 +1056,4 @@ class PageLayoutController {
 }
 
 
-?>
\ No newline at end of file
+?>
index 5dde247..9423748 100644 (file)
@@ -970,10 +970,6 @@ class InlineElement {
                $GLOBALS['SOBE']->tceforms->clipObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Clipboard\\Clipboard');
                // Initialize - reads the clipboard content from the user session
                $GLOBALS['SOBE']->tceforms->clipObj->initializeClipboard();
-               // Setting external variables:
-               if ($GLOBALS['BE_USER']->uc['edit_showFieldHelp'] != 'text' && $GLOBALS['SOBE']->MOD_SETTINGS['showDescriptions']) {
-                       $GLOBALS['SOBE']->tceforms->edit_showFieldHelp = 'text';
-               }
        }
 
        /**
index be003fe..0ec6085 100644 (file)
@@ -311,7 +311,7 @@ class FormEngine {
         */
        public $perms_clause_set = 0;
 
-       // Used to indicate the mode of CSH (Context Sensitive Help), whether it should be icons-only ('icon'), full description ('text') or not at all (blank).
+       // Used to indicate the mode of CSH (Context Sensitive Help), whether it should be icons-only ('icon') or not at all (blank).
        /**
         * @todo Define visibility
         */
index 11be41f..eb2a868 100644 (file)
@@ -2310,8 +2310,11 @@ class BackendUtility {
         * @param string $table Table name
         * @param string $field Field name
         * @return string HTML content for help text
+        * @depreacted since 6.0, will be removed two versions later
         */
        static public function helpText($table, $field) {
+               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
+
                $helpTextArray = self::helpTextArray($table, $field);
                $output = '';
                $arrow = '';
@@ -2387,35 +2390,21 @@ class BackendUtility {
         * @param boolean $onlyIconMode If set, the full text will never be shown (only icon). Useful for places where it will break the page if the table with full text is shown.
         * @param string $styleAttrib Additional style-attribute content for wrapping table (full text mode only)
         * @return string HTML content for help text
-        * @see helpText(), helpTextIcon()
+        * @see helpTextIcon()
         */
        static public function cshItem($table, $field, $BACK_PATH, $wrap = '', $onlyIconMode = FALSE, $styleAttrib = '') {
-               if ($GLOBALS['BE_USER']->uc['edit_showFieldHelp']) {
-                       $GLOBALS['LANG']->loadSingleTableDescription($table);
-                       if (is_array($GLOBALS['TCA_DESCR'][$table])) {
-                               // Creating CSH icon and short description:
-                               $fullText = self::helpText($table, $field);
-                               $icon = self::helpTextIcon($table, $field, $BACK_PATH);
-                               if ($fullText && !$onlyIconMode && $GLOBALS['BE_USER']->uc['edit_showFieldHelp'] == 'text') {
-                                       // Additional styles?
-                                       $params = $styleAttrib ? ' style="' . $styleAttrib . '"' : '';
-                                       // Compile table with CSH information:
-                                       $fullText = '<table border="0" cellpadding="0" cellspacing="0" class="typo3-csh-inline"' . $params . '>
-                                       <tr>
-                                       <td valign="top" width="14"><div class="t3-row-header">' . $icon . '</div></td>
-                                       <td valign="top">' . $fullText . '</td>
-                                       </tr>
-                                       </table>';
-                                       $output = $fullText;
-                               } else {
-                                       $output = $icon;
-                                       if ($output && $wrap) {
-                                               $wrParts = explode('|', $wrap);
-                                               $output = $wrParts[0] . $output . $wrParts[1];
-                                       }
-                               }
-                               return $output;
+               if (!$GLOBALS['BE_USER']->uc['edit_showFieldHelp']) {
+                       return '';
+               }
+               $GLOBALS['LANG']->loadSingleTableDescription($table);
+               if (is_array($GLOBALS['TCA_DESCR'][$table])) {
+                       // Creating CSH icon and short description:
+                       $output = self::helpTextIcon($table, $field, $BACK_PATH);
+                       if ($output && $wrap) {
+                               $wrParts = explode('|', $wrap);
+                               $output = $wrParts[0] . $output . $wrParts[1];
                        }
+                       return $output;
                }
        }
 
index a6ea008..8d92b90 100644 (file)
@@ -347,12 +347,7 @@ class FrontendEditPanel {
                $tceforms->backPath = TYPO3_mainDir;
                $tceforms->setFancyDesign();
                $tceforms->defStyle = 'font-family:Verdana;font-size:10px;';
-               $tceforms->edit_showFieldHelp = $GLOBALS['BE_USER']->uc['edit_showFieldHelp'];
-               // Icon only mode for CSH destroys the layout for frontend editing so force full text mode instead.
-               // @todo        Make sure the necessary Javascript and CSS are included so that CSH can work properly in all modes.
-               if ($tceforms->edit_showFieldHelp == 'icon') {
-                       $tceforms->edit_showFieldHelp = 'text';
-               }
+               $tceforms->edit_showFieldHelp = 0;
                $tceforms->helpTextFontTag = '<font face="verdana,sans-serif" color="#333333" size="1">';
                $trData = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\DataPreprocessor');
                $trData->addRawData = TRUE;
index 910db0c..575207e 100644 (file)
@@ -337,7 +337,6 @@ var typoscriptWords = {
        'edit_docModuleUplaod': 'reserved',
        'edit_docModuleUpload': 'reserved',
        'edit_RTE': 'reserved',
-       'edit_showFieldHelp': 'reserved',
        'edit_wideDocument': 'reserved',
        'editFieldsAtATime': 'reserved',
        'editFormsOnPage': 'reserved',
@@ -1666,7 +1665,6 @@ var typoscriptWords = {
        'edit_docModuleUplaod': 'reserved',
        'edit_docModuleUpload': 'reserved',
        'edit_RTE': 'reserved',
-       'edit_showFieldHelp': 'reserved',
        'edit_wideDocument': 'reserved',
        'editFieldsAtATime': 'reserved',
        'editFormsOnPage': 'reserved',
@@ -2656,4 +2654,4 @@ var tokenizeTypoScript = function() {
                        inValue: false
                };
        }
-} ();
\ No newline at end of file
+} ();