Short-circuit if we cannot initialize the spellcheck.

        Patch by kareila. 

diffs (14 lines):

diff -r 4713fd9d4898 -r 3d549c5277dc cgi-bin/LJ/SpellCheck.pm
--- a/cgi-bin/LJ/SpellCheck.pm  Tue Oct 05 12:12:19 2010 +0800
+++ b/cgi-bin/LJ/SpellCheck.pm  Tue Oct 05 18:54:49 2010 +0800
@@ -63,6 +63,10 @@ sub check_html {
 
     my $r = DW::Request->get;
     my ( $iwrite, $iread ) = $r->spawn( $self->{command}, 
$self->{command_args} );
+
+    # bail out here if we can't spawn the process
+    return "<?errorbar Could not initialize spell checker. Please open a 
support request if you see this message more than once. errorbar?>"
+        unless $iwrite && $iread;
     
     my $read_data = sub {
         my ( $fh ) = @_;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to