/[gnump3d]/gnump3d/lib/gnump3d/plugins/search.pm
ViewVC logotype

Diff of /gnump3d/lib/gnump3d/plugins/search.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by skx, Mon Jul 28 22:26:17 2003 UTC revision 1.2 by skx, Mon Oct 13 09:59:24 2003 UTC
# Line 115  E_O_E Line 115  E_O_E
115          # Search terms - if any.          # Search terms - if any.
116          my $terms = $ARGUMENTS{ "q" };          my $terms = $ARGUMENTS{ "q" };
117    
118    
119            #
120            # Remove XSS attacks
121            #
122            if ( defined( $terms ) && length( $terms ) )
123            {
124                $terms =~ s/</&lt;/g;
125                $terms =~ s/>/&gt;/g;
126            }
127    
128    
129          #          #
130          #  The mode will be either 'any' or 'all'          #  The mode will be either 'any' or 'all'
131          #          #
# Line 127  E_O_E Line 138  E_O_E
138              $mode = "any";              $mode = "any";
139          }          }
140    
         print "Search mode '$mode'\n";  
141    
142          #          #
143          # Now do the searching for real.          # Now do the searching for real.
# Line 148  E_O_E Line 158  E_O_E
158                  $match = 1;                  $match = 1;
159                  foreach my $term ( split( ' ', $terms ) )                  foreach my $term ( split( ' ', $terms ) )
160                  {                  {
                     print "Testing individual term '$term'\n";  
161                      # If the line doesn't contain a match for this term                      # If the line doesn't contain a match for this term
162                      # we've failed                      # we've failed
163                      if ( ! ( $line =~ /$term/i ) )                      if ( ! ( $line =~ /$term/i ) )
# Line 162  E_O_E Line 171  E_O_E
171                  # Searching for any term.                  # Searching for any term.
172                  foreach my $term ( split( ' ', $terms ) )                  foreach my $term ( split( ' ', $terms ) )
173                  {                  {
                     print "Testing individual term '$term'\n";  
174                      if ( $line =~ /$term/i )                      if ( $line =~ /$term/i )
175                      {                      {
176                          $match ++;                          $match ++;
# Line 254  E_O_E Line 262  E_O_E
262                          # Display format for the results.                          # Display format for the results.
263                          my $format = &getConfig( "plugin_search_song_format",                          my $format = &getConfig( "plugin_search_song_format",
264                                                   '$ARTIST - $SONGNAME' );                                                   '$ARTIST - $SONGNAME' );
265                            $tagCache->setSongFormat( $format );
266    
267                          #                          #
268                          # Display the results.                          # Display the results.

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26