Explorar o código

Add flush statement after the search form. Searching can take a long time,
this makes sure the search form is output as a whole directly when it's
available. With me, the search form will only be output partly as the
other half is buffered waiting for search results.

Thijs Kinkhorst %!s(int64=21) %!d(string=hai) anos
pai
achega
3da826d525
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/search.php

+ 2 - 0
src/search.php

@@ -1048,6 +1048,8 @@ if ($submit == $search_button_text) {
 	echo html_tag('tr', html_tag('td', asearch_get_query_display($color, $mailbox_array, $biop_array, $unop_array, $where_array, $what_array, $exclude_array, $sub_array), 'center', $color[4]));
 	echo html_tag('tr', html_tag('td', asearch_get_query_display($color, $mailbox_array, $biop_array, $unop_array, $where_array, $what_array, $exclude_array, $sub_array), 'center', $color[4]));
 	echo '</table>' . "\n";
 	echo '</table>' . "\n";
 
 
+	flush();
+
 	$query_error = asearch_check_query($where_array, $what_array, $exclude_array);
 	$query_error = asearch_check_query($where_array, $what_array, $exclude_array);
 	if ($query_error != '')
 	if ($query_error != '')
 		echo '<br>' . html_tag('div', asearch_get_error_display($color, $query_error), 'center') . "\n";
 		echo '<br>' . html_tag('div', asearch_get_error_display($color, $query_error), 'center') . "\n";