Added $CFG->aspellpath check in editor_get_dictionaries function.

This commit is contained in:
julmis 2005-01-22 11:19:20 +00:00
parent 19fafd2311
commit 773919b17a

View 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;