[Home]SearchTitleAndBody/Code

UseModWiki | SearchTitleAndBody | RecentChanges | Preferences

Version 0.92

sub SearchTitleAndBody {
  my ($string) = @_;
  my ($name, $freeName, @found);

  foreach $name (&AllPagesList()) {
    &OpenPage($name);
    &OpenDefaultText();
    if (($Text{'text'} =~ /$string/i) || ($name =~ /$string/i)) {
      push(@found, $name);
    } elsif ($FreeLinks && ($name =~ m/_/)) {
      $freeName = $name;
      $freeName =~ s/_/ /g;
      if ($freeName =~ /$string/i) {
        push(@found, $name);
      }
    }
  }
  return @found;
}


UseModWiki | SearchTitleAndBody | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited March 31, 2006 5:34 pm by MarkusLude (diff)
Search: