]> git.mjollnir.org Git - moodle.git/commitdiff
Added $CFG->aspellpath check in editor_get_dictionaries function.
authorjulmis <julmis>
Sat, 22 Jan 2005 11:19:20 +0000 (11:19 +0000)
committerjulmis <julmis>
Sat, 22 Jan 2005 11:19:20 +0000 (11:19 +0000)
admin/editor.php

index d50b394bb2023540a58e1239f5aa3ed9d3f9c06b..9d3f75b0a721f4ede5b8b04881781567d8ff543f 100644 (file)
@@ -154,11 +154,19 @@ function reset_to_defaults () {
 function editor_get_dictionaries () {
 /// Get all installed dictionaries in the system
 
+    global $CFG;
+
     error_reporting(E_ALL); // for debug, final version shouldn't have this...
     clearstatcache();
 
-    $strerror     = '';
+    $strerror = '';
+
+    // If aspellpath isn't set don't even bother ;-)
+    if (empty($CFG->aspellpath)) {
+        return $strerror = 'Empty aspell path!';
+    }
 
+    // Do we have access to popen function?
     if (!function_exists('popen')) {
         return $strerror = "Popen function disabled!";
         exit;