From: graf25 Date: Wed, 6 Mar 2002 02:09:21 +0000 (+0000) Subject: Adding error reporting routines, by popular demand. :) X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=d88c744e9b47a087477bc0fbe5e739291c85d6ba;hp=4d0cd98b8241fa96f0d02ad699057ba4580bbc57 Adding error reporting routines, by popular demand. :) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2545 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/squirrelspell/modules/check_me.mod b/plugins/squirrelspell/modules/check_me.mod index 65428a50..370241f1 100644 --- a/plugins/squirrelspell/modules/check_me.mod +++ b/plugins/squirrelspell/modules/check_me.mod @@ -101,12 +101,27 @@ fclose($fp); /** * Execute ispell/aspell and catch the output. */ -exec("cat $floc | $sqspell_command", $sqspell_output); +exec("cat $floc | $sqspell_command 2>&1", $sqspell_output, $sqspell_exitcode); /** * Remove the temp file. */ unlink($floc); +/** + * Check if the execution was successful. Bail out if it wasn't. + */ +if ($sqspell_exitcode){ + $msg= "
" + . sprintf(_("I tried to execute '%s', but it returned:"), + $sqspell_command) . "
"
+     . nl2br(join("\n", $sqspell_output)) . "
" + . "
" + . "
"; + sqspell_makeWindow(null, _("SquirrelSpell is misconfigured."), null, $msg); + exit; +} + /** * Load the user dictionary. */ diff --git a/plugins/squirrelspell/sqspell_functions.php b/plugins/squirrelspell/sqspell_functions.php index 189a0e20..333083a3 100644 --- a/plugins/squirrelspell/sqspell_functions.php +++ b/plugins/squirrelspell/sqspell_functions.php @@ -513,5 +513,5 @@ function sqspell_ckMOD($rMOD){ * of the user dictionary files and messing with this can do ugly * stuff. :) */ -$SQSPELL_VERSION="v0.3.7"; +$SQSPELL_VERSION="v0.3.8"; ?>