MDL-24484 fixed spellchecker regressions
authorPetr Skoda <skodak@moodle.org>
Sun, 3 Oct 2010 11:01:17 +0000 (11:01 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 3 Oct 2010 11:01:17 +0000 (11:01 +0000)
lib/editor/tinymce/tiny_mce/3.3.9.2/plugins/spellchecker/config.php
lib/editor/tinymce/tiny_mce/3.3.9.2/plugins/spellchecker/includes/general.php

index 380dce9..be64e8d 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 require_once(dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))))).'/config.php'); // moodle hack
+@error_reporting(E_ALL ^ E_NOTICE); // hide notices even if Moodle is configured to show them
 
        // General settings
        $config['general.engine'] = get_config('editor_tinymce', 'spellengine') ? get_config('editor_tinymce', 'spellengine') : 'GoogleSpell';
@@ -13,18 +14,20 @@ require_once(dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__F
        //$config['general.engine'] = 'PSpellShell';
        //$config['general.remote_rpc_url'] = 'http://some.other.site/some/url/rpc.php';
 
-       // PSpell settings
-       $config['PSpell.mode'] = PSPELL_FAST;
-       $config['PSpell.spelling'] = "";
-       $config['PSpell.jargon'] = "";
-       $config['PSpell.encoding'] = "";
+    if ($config['general.engine'] === 'PSpell' or $config['general.engine'] === 'PSpellShell') {
+        // PSpell settings
+        $config['PSpell.mode'] = PSPELL_FAST;
+        $config['PSpell.spelling'] = "";
+        $config['PSpell.jargon'] = "";
+        $config['PSpell.encoding'] = "";
 
-       // PSpellShell settings
-       $config['PSpellShell.mode'] = PSPELL_FAST;
-       $config['PSpellShell.aspell'] = $CFG->aspellpath;
-       $config['PSpellShell.tmp'] = '/tmp';
+        // PSpellShell settings
+        $config['PSpellShell.mode'] = PSPELL_FAST;
+        $config['PSpellShell.aspell'] = $CFG->aspellpath;
+        $config['PSpellShell.tmp'] = '/tmp';
 
-       // Windows PSpellShell settings
-       //$config['PSpellShell.aspell'] = '"c:\Program Files\Aspell\bin\aspell.exe"';
-       //$config['PSpellShell.tmp'] = 'c:/temp';
+        // Windows PSpellShell settings
+        //$config['PSpellShell.aspell'] = '"c:\Program Files\Aspell\bin\aspell.exe"';
+        //$config['PSpellShell.tmp'] = 'c:/temp';
+    }
 ?>
index ffea3a0..8c6fe68 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @package MCManager.includes
  * @author Moxiecode
- * @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved.
+ * @copyright Copyright  2007, Moxiecode Systems AB, All rights reserved.
  */
 
 @error_reporting(E_ALL ^ E_NOTICE);
@@ -74,7 +74,7 @@ function info($msg) {
        $log->info(implode(', ', $args));
 }
 
-function error($msg) {
+function xx_error($msg) { // collides with our moodle error(), it does not look to be used at all
        $args = func_get_args();
 
        $log = getLogger();