X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e8b39b094116e8b50cf12fe56b9c6a04f05683e5..1aac0b5a60b8445422f44325870cbf6c28c57196:/IkiWiki/Plugin/aggregate.pm?ds=sidebyside
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index d6592fef3..4bc919526 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -35,12 +35,14 @@ sub getopt () { #{{{
} #}}}
sub checkconfig () { #{{{
+ IkiWiki::lockwiki();
loadstate();
if ($IkiWiki::config{aggregate}) {
IkiWiki::loadindex();
aggregate();
savestate();
}
+ IkiWiki::unlockwiki();
} #}}}
sub filter (@) { #{{{
@@ -98,7 +100,7 @@ sub preprocess (@) { #{{{
return "{url}."\">".$feed->{name}.": ".
"".$feed->{message}." (".$feed->{numposts}.
- " stored posts; ".$feed->{newposts}." new)
";
+ " stored posts; ".$feed->{newposts}." new)";
} # }}}
sub delete (@) { #{{{
@@ -260,13 +262,12 @@ sub add_page (@) { #{{{
# directory name or trigger ".." disallowing code.
$page=~s!([/.])!"__".ord($1)."__"!eg;
$page=$feed->{dir}."/".$page;
- $page=lc($page);
($page)=$page=~/$IkiWiki::config{wiki_file_regexp}/;
if (! defined $page || ! length $page) {
$page=$feed->{dir}."/item";
}
my $c="";
- while (exists $IkiWiki::pagesources{$page.$c} ||
+ while (exists $IkiWiki::pagecase{lc $page.$c} ||
-e pagefile($page.$c)) {
$c++
}
@@ -289,14 +290,14 @@ sub add_page (@) { #{{{
$template->param(title => $params{title})
if defined $params{title} && length($params{title});
$template->param(content => htmlescape(htmlabs($params{content}, $feed->{feedurl})));
- $template->param(url => $feed->{url});
$template->param(name => $feed->{name});
- $template->param(link => urlabs($params{link}, $feed->{feedurl}))
+ $template->param(url => $feed->{url});
+ $template->param(permalink => urlabs($params{link}, $feed->{feedurl}))
if defined $params{link};
if (ref $feed->{tags}) {
$template->param(tags => [map { tag => $_ }, @{$feed->{tags}}]);
}
- IkiWiki::writefile($guid->{page}.".html", $IkiWiki::config{srcdir},
+ IkiWiki::writefile(IkiWiki::htmlpage($guid->{page}), $IkiWiki::config{srcdir},
$template->output);
# Set the mtime, this lets the build process get the right creation
@@ -322,7 +323,7 @@ sub htmlabs ($$) { #{{{
# Convert links in html from relative to absolute.
# Note that this is a heuristic, which is not specified by the rss
# spec and may not be right for all feeds. Also, see Debian
- # bug #XXXX TODO: get bug.
+ # bug #381359.
my $html=shift;
my $urlbase=shift;
@@ -371,7 +372,7 @@ sub remove_feeds () { #{{{
sub pagefile ($) { #{{{
my $page=shift;
- return "$IkiWiki::config{srcdir}/$page.html";
+ return "$IkiWiki::config{srcdir}/".IkiWiki::htmlpage($page);
} #}}}
1