[TASK] htmlArea RTE: Remove references to safe mode
authorstan <typo3@sjbr.ca>
Wed, 15 Jun 2011 02:08:55 +0000 (22:08 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 15 Jun 2011 14:59:06 +0000 (16:59 +0200)
safe_mode is not supported in TYPO3 4.6.

Change-Id: I5fdefc9595ee65bc911711851ae6e20c9f381e25
Resolves: #27408
Releases: 4.6
Reviewed-on: http://review.typo3.org/2749
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/doc/manual.sxw
typo3/sysext/rtehtmlarea/ext_conf_template.txt
typo3/sysext/rtehtmlarea/ext_emconf.php
typo3/sysext/rtehtmlarea/extensions/SpellChecker/class.tx_rtehtmlarea_spellchecker.php
typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-checker.js
typo3/sysext/rtehtmlarea/pi1/class.tx_rtehtmlarea_pi1.php

index f6c1942..97dd02d 100644 (file)
Binary files a/typo3/sysext/rtehtmlarea/doc/manual.sxw and b/typo3/sysext/rtehtmlarea/doc/manual.sxw differ
index 27f3a3f..b5f1d7e 100644 (file)
@@ -23,7 +23,7 @@ allowStyleAttribute = 1
   # cat=basic/enable/140; type=boolean; label=Enable links accessibility icons: If set, accessibility icons will be added in front of links.
 enableAccessibilityIcons = 0
 
-  # cat=basic/enable/170; type=boolean; label=Force Aspell command mode: If set, the spellchecker will use the Aspell command interface. Presumably. PHP is compiled with pspell, but with an old version of Aspell. If set, PHP safe mode should NOT be enabled.
+  # cat=basic/enable/170; type=boolean; label=Force Aspell command mode: If set, the spellchecker will use the Aspell command interface. Presumably. PHP is compiled with pspell, but with an old version of Aspell.
 forceCommandMode = 0
 
   # cat=basic/enable/180; type=boolean; label=Enable compressed scripts: If set, the compressed version of the editor scripts will be used.
index b137839..e908aef 100644 (file)
@@ -37,7 +37,7 @@ $EM_CONF[$_EXTKEY] = array(
        'constraints' => array(
                'depends' => array(
                        'cms' => '',
-                       'php' => '5.2-0.0.0',
+                       'php' => '5.3-0.0.0',
                        'typo3' => '4.6.0-4.6.99',
                ),
                'conflicts' => array(
index 3722c78..52ad441 100644 (file)
@@ -73,7 +73,7 @@ class tx_rtehtmlarea_spellchecker extends tx_rtehtmlarea_api {
                }
                        // Set the use of personal dictionary
                $enablePersonalDicts = $this->thisConfig['buttons.'][$button.'.']['enablePersonalDictionaries'] ? ((isset($GLOBALS['BE_USER']->userTS['options.']['enablePersonalDicts']) && $GLOBALS['BE_USER']->userTS['options.']['enablePersonalDicts']) ? TRUE : FALSE) : FALSE;
-               if (t3lib_utility_PhpOptions::isSafeModeEnabled() || $this->htmlAreaRTE->is_FE()) {
+               if ($this->htmlAreaRTE->is_FE()) {
                        $enablePersonalDicts = FALSE;
                }
 
index d8412f8..3efa101 100644 (file)
@@ -42,13 +42,12 @@ HTMLArea.SpellChecker = Ext.extend(HTMLArea.Plugin, {
                this.enablePersonalDicts = this.pageTSconfiguration.enablePersonalDicts;
                this.userUid = this.editorConfiguration.userUid;
                this.defaultDictionary = (this.pageTSconfiguration.dictionaries && this.pageTSconfiguration.dictionaries[this.contentISOLanguage] && this.pageTSconfiguration.dictionaries[this.contentISOLanguage].defaultValue) ? this.pageTSconfiguration.dictionaries[this.contentISOLanguage].defaultValue : '';
-               this.showDictionaries = (this.pageTSconfiguration.dictionaries && this.pageTSconfiguration.dictionaries.items) ? this.pageTSconfiguration.dictionaries.items : '';
                this.restrictToDictionaries = (this.pageTSconfiguration.dictionaries && this.pageTSconfiguration.dictionaries.restrictToItems) ? this.pageTSconfiguration.dictionaries.restrictToItems : '';
                /*
                 * Registering plugin "About" information
                 */
                var pluginInformation = {
-                       version         : '3.1',
+                       version         : '3.2',
                        developer       : 'Mihai Bazon & Stanislas Rolland',
                        developerUrl    : 'http://www.sjbr.ca/',
                        copyrightOwner  : 'Mihai Bazon & Stanislas Rolland',
@@ -186,10 +185,6 @@ HTMLArea.SpellChecker = Ext.extend(HTMLArea.Plugin, {
                                                        value: this.enablePersonalDicts
                                                },{
                                                        xtype: 'hidden',
-                                                       name:'showDictionaries',
-                                                       value: this.showDictionaries
-                                               },{
-                                                       xtype: 'hidden',
                                                        name:'restrictToDictionaries',
                                                        value: this.restrictToDictionaries
                                                }
index 73e3f2c..0613392 100644 (file)
@@ -69,25 +69,17 @@ class tx_rtehtmlarea_pi1 {
                $time_start = microtime(TRUE);
                $this->pspell_is_available = in_array('pspell', get_loaded_extensions());
                $this->AspellDirectory = trim($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['plugins']['SpellChecker']['AspellDirectory'])? trim($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['plugins']['SpellChecker']['AspellDirectory']) : '/usr/bin/aspell';
+                       // Setting command mode if requested and available
                $this->forceCommandMode = (trim($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['plugins']['SpellChecker']['forceCommandMode']))? trim($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['plugins']['SpellChecker']['forceCommandMode']) : 0;
-               $safe_mode_is_enabled = t3lib_utility_PhpOptions::isSafeModeEnabled();
-               if($safe_mode_is_enabled && !$this->pspell_is_available ) echo('Configuration problem: Spell checking cannot be performed');
-               if($safe_mode_is_enabled && $this->forceCommandMode) echo('Configuration problem: Spell checking cannot be performed in command mode');
-               if(!$safe_mode_is_enabled && (!$this->pspell_is_available || $this->forceCommandMode)) {
+               if (!$this->pspell_is_available || $this->forceCommandMode) {
                        $AspellVersionString = explode('Aspell', shell_exec( $this->AspellDirectory.' -v'));
                        $AspellVersion = substr( $AspellVersionString[1], 0, 4);
-                       if( doubleval($AspellVersion) < doubleval('0.5') && (!$this->pspell_is_available || $this->forceCommandMode)) echo('Configuration problem: Aspell version ' . $AspellVersion . ' too old. Spell checking cannot be performed in command mode');
+                       if( doubleval($AspellVersion) < doubleval('0.5') && (!$this->pspell_is_available || $this->forceCommandMode)) echo('Configuration problem: Aspell version ' . $AspellVersion . ' too old. Spell checking cannot be performed in command mode.');
                        $this->defaultAspellEncoding = trim(shell_exec($this->AspellDirectory.' config encoding'));
                }
-
                        // Setting the list of dictionaries
-               if (!$safe_mode_is_enabled && (!$this->pspell_is_available || $this->forceCommandMode)) {
-                       $dictionaryList = shell_exec( $this->AspellDirectory.' dump dicts');
-                       $dictionaryList = implode(',', t3lib_div::trimExplode(LF, $dictionaryList, 1));
-               }
-               if (empty($dictionaryList)) {
-                       $dictionaryList = t3lib_div::_POST('showDictionaries');
-               }
+               $dictionaryList = shell_exec( $this->AspellDirectory . ' dump dicts');
+               $dictionaryList = implode(',', t3lib_div::trimExplode(LF, $dictionaryList, 1));
                $dictionaryArray = t3lib_div::trimExplode(',', $dictionaryList, 1);
                $restrictToDictionaries = t3lib_div::_POST('restrictToDictionaries');
                if ($restrictToDictionaries) {
@@ -158,7 +150,7 @@ class tx_rtehtmlarea_pi1 {
                }
 
                $cmd = t3lib_div::_POST('cmd');
-               if ($cmd == 'learn' && !$safe_mode_is_enabled) {
+               if ($cmd == 'learn') {
                                // Only availble for BE_USERS, die silently if someone has gotten here by accident
                        if (TYPO3_MODE !='BE' || !is_object($GLOBALS['BE_USER'])) die('');
                                // Updating the personal word list
@@ -251,7 +243,6 @@ var selectedDictionary = "' . $this->dictionary . '";
                        $this->result .= '<body onload="window.parent.RTEarea[\'' . t3lib_div::_POST('editorId') . '\'].editor.getPlugin(\'SpellChecker\').spellCheckComplete();">';
                        $this->result .= preg_replace('/'.preg_quote('<?xml').'.*'.preg_quote('?>').'['.preg_quote(LF.CR.chr(32)).']*/'.(($this->parserCharset == 'utf-8')?'u':''), '', $this->text);
                        $this->result .= '<div style="display: none;">'.$dictionaries.'</div>';
-
                                // Closing
                        $this->result .= '
 </body></html>';