Changeset 1881
- Timestamp:
- 11/28/06 18:37:40
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/Filter/EntryFullText.pm
r1859 r1881 125 125 126 126 # use Last-Modified to populate entry date, even if handler doesn't find one 127 # TODO: make this a separate plugin 127 128 if ($res->last_modified && !$args->{entry}->date) { 128 129 $args->{entry}->date( Plagger::Date->from_epoch($res->last_modified) ); … … 131 132 my @plugins = $handler ? ($handler) : @{ $self->{plugins} }; 132 133 134 my $upgraded; 133 135 for my $plugin (@plugins) { 134 136 if ( $handler || $plugin->handle($args) ) { … … 157 159 } 158 160 159 return 1; 161 $upgraded++; 162 last; 160 163 } 161 164 } 162 165 } 166 167 # extract TITLE tag if title is not set yet 168 # TODO: make this a separate plugin 169 if (!$args->{entry}->title 170 and $args->{content} =~ m!<title>\s*(.*?)\s*</title>!is ) { 171 $args->{entry}->title( HTML::Entities::decode($1) ); 172 } 173 174 return 1 if $upgraded; 163 175 164 176 # failed to extract: store whole HTML if the config is on
