Changeset 14337


Ignore:
Timestamp:
2007-08-08T12:15:03+12:00 (15 years ago)
Author:
anna
Message:

Fixed a bug in extracting search box.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/MediaWikiPlug.pm

    r14251 r14337  
    375375    } else {
    376376        $preserve_sections .= "\n$searchbox_section\n";
    377     }   
    378    
     377    }
    379378   
    380379    if($preserve_sections ne ""){
    381380      $preserve_sections = "<div id=\"column-one\">\n" . $preserve_sections . "\n</div>\n";
    382381    }
    383     $preserve_sections = "</div></div></div>\n" . $preserve_sections . "\n</body>";    
    384    
     382    $preserve_sections = "</div></div></div>\n" . $preserve_sections . "\n</body>";   
     383           
    385384    $body_text =~ s/$print_footer/$preserve_sections/isg;
    386385   
     
    389388    my @forms;
    390389    my $form_count = 0;
    391     while($body_text =~ m/<form([^>]*)name=("|')([^>]*)("|')/isg){
    392         next if($3 eq "q");
    393         $forms[$form_count++] = $&;
     390    while($body_text =~ m/<form([^>]*)name=("|')([^>"']*)?("|')/isg){
     391        next if($3 eq "searchform");
     392        $forms[$form_count++] = $&;       
    394393    }
    395394    foreach my $form (@forms) {     
    396395      $body_text =~ s/$form[\s\S]*?<\/form>//m;
    397     }   
    398    
     396    }
    399397   
    400398    # process links.
Note: See TracChangeset for help on using the changeset viewer.