]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9300 The aspell spell-checker does not work in 1.8; merged from MOODLE_18_STABLE
authorskodak <skodak>
Sun, 15 Apr 2007 17:04:26 +0000 (17:04 +0000)
committerskodak <skodak>
Sun, 15 Apr 2007 17:04:26 +0000 (17:04 +0000)
lib/speller/controls.html
lib/speller/server-scripts/spellchecker.php

index 868c64e07c672bf08abfb711123fc9a2970c4eba..6f2831af81ebc7478f4dec3a7c7596ff337a9df2 100644 (file)
@@ -55,7 +55,7 @@ function suggText() {
 }
 
 function init_spell() {
-       var controlForm = getElementById('spellcheck');
+       var controlForm = document.getElementById('spellcheck');
 
        // create a new controlWindow object
        controlWindowObj = new controlWindow( controlForm );
index 841da0346b881793ab9f97a030c81cdbcf87a94f..1831184698b393306c88b45997c1b77017593291 100644 (file)
@@ -2,6 +2,10 @@
     include_once("../../../config.php");
     require_login();
 
+if (empty($CFG->aspellpath)) {
+    error('Spellchecker not configured');
+}
+
 header('Content-type: text/html; charset=utf-8');
 
 // Speller pages script http://spellerpages.sourceforge.net/
@@ -35,9 +39,8 @@ function check_language($cmd) {
 
     global $CFG;
 
-    error_reporting(E_ALL); // for debug, final version shouldn't have this...
     clearstatcache();
-    $current_lang = current_language();
+    $current_lang = str_replace('_utf8', '', current_language());
     $output = '';
 
     if(!($handle = popen($cmd .' dump dicts', 'r'))) {