Fix error in search results if an entry only contained HTML.

        Patch by exor674. 

diffs (11 lines):

diff -r 7187be3b25d2 -r cec770c33c9a bin/worker/sphinx-search-gm
--- a/bin/worker/sphinx-search-gm       Tue Nov 03 01:48:39 2009 +0000
+++ b/bin/worker/sphinx-search-gm       Tue Nov 03 01:50:25 2009 +0000
@@ -87,6 +87,7 @@ sub sphinx_search {
                 $match->{entry} = $entry->event_text;
                 $match->{entry} =~ s#<(?:br|p)\s*/?># #gi;
                 $match->{entry} = LJ::strip_html( $match->{entry} );
+                $match->{entry} ||= "(this entry only contains html content)";
 
                 # we don't munge the subject... just clean it
                 $match->{subject} = $entry->subject_text || '(no subject)';
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to