/[webpac]/trunk/all2xml.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/all2xml.pl

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

revision 178 by dpavlin, Mon Nov 24 21:54:19 2003 UTC revision 181 by dpavlin, Tue Nov 25 20:19:03 2003 UTC
# Line 102  sub data2xml { Line 102  sub data2xml {
102          }          }
103    
104          my @sorted_tags;          my @sorted_tags;
105          if ($cache->{tags_by_order}->{$type}) {          if ($cache->{tags_by_order}) {
106                  @sorted_tags = @{$cache->{tags_by_order}->{$type}};                  @sorted_tags = @{$cache->{tags_by_order}};
107          } else {          } else {
108                  @sorted_tags = sort by_order keys %{$config->{indexer}};                  @sorted_tags = sort by_order keys %{$config->{indexer}};
109                  $cache->{tags_by_order}->{$type} = \@sorted_tags;                  $cache->{tags_by_order} = \@sorted_tags;
110          }          }
111    
112          # lookup key          # lookup key
113          my $lookup_key;          my $lookup_key;
114    
115          # cache for field in pages          # cache for field in pages
116          $cache->{display_data} = ();          delete $cache->{display_data};
117          $cache->{swish_data} = ();          delete $cache->{swish_data};
118          $cache->{swish_exact_data} = ();          delete $cache->{swish_exact_data};
119          my @page_fields;        # names of fields          my @page_fields;        # names of fields
120    
121    
# Line 175  sub data2xml { Line 175  sub data2xml {
175                          my ($s,$se,$d,$i,$il) = (1,0,1,0,0);                          my ($s,$se,$d,$i,$il) = (1,0,1,0,0);
176                          $s = 0 if (lc($x->{type}) eq "display");                          $s = 0 if (lc($x->{type}) eq "display");
177                          $d = 0 if (lc($x->{type}) eq "swish");                          $d = 0 if (lc($x->{type}) eq "swish");
178                          $se = 1 if (lc($x->{type}) eq "swish_exact");                          ($s,$se,$d,$i) = (0,0,0,1) if (lc($x->{type}) eq "index");
179                          ($s,$d,$i) = (0,0,1) if (lc($x->{type}) eq "index");                          ($s,$se,$d,$i) = (0,1,0,0) if (lc($x->{type}) eq "swish_exact");
180                          $il = 1 if (lc($x->{type}) =~ /^lookup/);                          $il = 1 if (lc($x->{type}) =~ /^lookup/);
181    
   
182                          # what will separate last line from this one?                          # what will separate last line from this one?
183                          if ($display_data && $x->{append} && $x->{append} eq "1") {                          if ($display_data && $x->{append} && $x->{append} eq "1") {
184                                  $line_delimiter = ' ';                                  $line_delimiter = ' ';
# Line 566  print STDERR "reading ./import_xml/$type Line 565  print STDERR "reading ./import_xml/$type
565          # now read database          # now read database
566  print STDERR "using: $type...\n";  print STDERR "using: $type...\n";
567    
568            # erase cache for tags by order in this database
569            delete $cache->{tags_by_order};
570    
571          if ($type_base eq "isis") {          if ($type_base eq "isis") {
572    
573                  my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!";                  my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!";

Legend:
Removed from v.178  
changed lines
  Added in v.181

  ViewVC Help
Powered by ViewVC 1.1.26