version 1.248, 2005/11/29 20:25:44
|
version 1.251, 2006/02/05 20:56:57
|
Line 1542 sub parse_advanced_search {
|
Line 1542 sub parse_advanced_search {
|
## |
## |
my ($libraries_to_query,$pretty_domains_string,$domain_sql_restriction) = |
my ($libraries_to_query,$pretty_domains_string,$domain_sql_restriction) = |
&parse_domain_restrictions(); |
&parse_domain_restrictions(); |
push(@queries,$domain_sql_restriction); |
if ((defined($domain_sql_restriction)) && ($domain_sql_restriction ne '')) { |
$pretty_search_string .= $pretty_domains_string."<br />\n"; |
push(@queries,$domain_sql_restriction); |
|
$pretty_search_string .= $pretty_domains_string."<br />\n"; |
|
} |
# |
# |
if (@queries) { |
if (@queries) { |
$query="SELECT * FROM metadata WHERE (".join(") AND (",@queries).')'; |
$query="SELECT * FROM metadata WHERE (".join(") AND (",@queries).')'; |
Line 2291 sub update_status {
|
Line 2293 sub update_status {
|
} |
} |
|
|
{ |
{ |
my $max_time = 40; # seconds for the search to complete |
my $max_time = 300; # seconds for the search to complete |
my $start_time = 0; |
my $start_time = 0; |
my $last_time = 0; |
my $last_time = 0; |
|
|
Line 2790 sub display_results {
|
Line 2792 sub display_results {
|
exists($sort_fields{$env{'form.sortfield'}})) { |
exists($sort_fields{$env{'form.sortfield'}})) { |
$sort_command = $env{'form.sortfield'}.' IS NOT NULL '. |
$sort_command = $env{'form.sortfield'}.' IS NOT NULL '. |
'ORDER BY '.$env{'form.sortfield'}.' '.$order. |
'ORDER BY '.$env{'form.sortfield'}.' '.$order. |
' LIMIT '.($min-1).','.($max-$min); |
' LIMIT '.($min-1).','.($max-$min+1); |
} |
} |
my @Results = &Apache::lonmysql::get_rows($table,$sort_command); |
my @Results = &Apache::lonmysql::get_rows($table,$sort_command); |
## |
## |