version 1.209, 2004/04/19 16:53:27
|
version 1.210, 2004/04/19 17:40:00
|
Line 1918 END
|
Line 1918 END
|
END |
END |
$r->rflush(); |
$r->rflush(); |
my $time_remaining = $max_time - (time - $starttime) ; |
my $time_remaining = $max_time - (time - $starttime) ; |
|
$time_remaining = 0 if ($time_remaining <0); |
my $last_time = $time_remaining; |
my $last_time = $time_remaining; |
&update_seconds($r,$time_remaining); |
&update_seconds($r,$time_remaining); |
&update_status($r,'contacting '.$Servers_to_contact[0]); |
&update_status($r,'contacting '.$Servers_to_contact[0]); |
while (($time_remaining > 0) && |
while (($time_remaining > 0) && |
((@Servers_to_contact) || keys(%Server_status))) { |
((@Servers_to_contact) || keys(%Server_status))) { |
|
&update_seconds($r,$time_remaining); |
# Send out a search request if it needs to be done. |
# Send out a search request if it needs to be done. |
if (@Servers_to_contact) { |
if (@Servers_to_contact) { |
# Contact one server |
# Contact one server |
Line 1948 END
|
Line 1950 END
|
# have results from yet, looking for results. |
# have results from yet, looking for results. |
while (my ($server,$status) = each(%Server_status)) { |
while (my ($server,$status) = each(%Server_status)) { |
last if ($connection->aborted()); |
last if ($connection->aborted()); |
|
$time_remaining = $max_time - (time - $starttime) ; |
|
$time_remaining = 0 if ($time_remaining < 0); |
|
if ($last_time - $time_remaining > 0) { |
|
$last_time = $time_remaining; |
|
&update_seconds($r,$time_remaining); |
|
} |
if ($status eq 'con_lost') { |
if ($status eq 'con_lost') { |
delete ($Server_status{$server}); |
delete ($Server_status{$server}); |
next; |
next; |
Line 1990 END
|
Line 1998 END
|
# $r->print(&Apache::lonmysql::get_debug()); |
# $r->print(&Apache::lonmysql::get_debug()); |
$hitcountsum ++; |
$hitcountsum ++; |
$time_remaining = $max_time - (time - $starttime) ; |
$time_remaining = $max_time - (time - $starttime) ; |
|
$time_remaining = 0 if ($time_remaining < 0); |
if ($last_time - $time_remaining > 0) { |
if ($last_time - $time_remaining > 0) { |
&update_seconds($r,$time_remaining); |
&update_seconds($r,$time_remaining); |
$last_time = $time_remaining; |
$last_time = $time_remaining; |
Line 2185 sub display_results {
|
Line 2194 sub display_results {
|
} |
} |
my %Fields = %{&parse_row(@$row)}; |
my %Fields = %{&parse_row(@$row)}; |
my $output="<p>\n"; |
my $output="<p>\n"; |
|
if (! defined($Fields{'title'}) || $Fields{'title'} eq '') { |
|
$Fields{'title'} = 'Untitled'; |
|
} |
my $prefix=&catalogmode_output($Fields{'title'},$Fields{'url'}, |
my $prefix=&catalogmode_output($Fields{'title'},$Fields{'url'}, |
$Fields{'id'},$checkbox_num++); |
$Fields{'id'},$checkbox_num++); |
# Render the result into html |
# Render the result into html |