139 |
$words =~ s/\W+$//; |
$words =~ s/\W+$//; |
140 |
|
|
141 |
# first try to generate headline for this entry from index |
# first try to generate headline for this entry from index |
142 |
my $h = shift @{$ds->{'index'}}; |
my $h = $ds->{'index'}->[0]; |
143 |
# then, from display |
# then, from display |
144 |
$h ||= shift @{$ds->{'display'}}; |
$h ||= $ds->{'display'}->[0]; |
145 |
# and as last resport, fallback to headline |
# and as last resport, fallback to headline |
146 |
$h ||= $headline; |
$h ||= $headline; |
147 |
|
|
158 |
foreach my $ds (@ds) { |
foreach my $ds (@ds) { |
159 |
next if (! $ds->{'index'}); |
next if (! $ds->{'index'}); |
160 |
|
|
161 |
$thes->{$ds->{'tag'}} ||= new WebPAC::Index; |
$thes->{$ds->{'tag'}} ||= new WebPAC::Index( name => $ds->{'tag'} ); |
162 |
|
|
163 |
foreach my $h (@{$ds->{'index'}}) { |
foreach my $h (@{$ds->{'index'}}) { |
164 |
$thes->{$ds->{'tag'}}->insert( |
$thes->{$ds->{'tag'}}->insert( |