aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-03-24 15:10:58 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-03-24 15:10:58 +0000
commitbbb0b3e72f6a3ffaac8343fc847800d7faaa7573 (patch)
treee14c3599c78123ed6740b0352b2fe45401ceb5b4 /IkiWiki/Render.pm
parentdc0bf7982fa35362ac7e750640323891c7268ed2 (diff)
downloadikiwiki-bbb0b3e72f6a3ffaac8343fc847800d7faaa7573.tar
ikiwiki-bbb0b3e72f6a3ffaac8343fc847800d7faaa7573.tar.gz
* Finally fixed the longstanding inline removal bug.
* Renamed %oldpagemtime to a more accurately named %pagemtime and fix it to actually store pages' mtimes. * Add "mtime" sort parameter to inline plugin.
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r--IkiWiki/Render.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 990b803de..c5d885810 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -192,7 +192,6 @@ sub render ($) { #{{{
writefile(htmlpage($page), $config{destdir},
genpage($page, $content, mtime($srcfile)));
- $oldpagemtime{$page}=time;
}
else {
my $srcfd=readfile($srcfile, 1, 1);
@@ -218,7 +217,6 @@ sub render ($) { #{{{
}
}
});
- $oldpagemtime{$file}=time;
}
} #}}}
@@ -294,7 +292,7 @@ sub refresh () { #{{{
foreach my $file (@files) {
my $page=pagename($file);
$pagesources{$page}=$file;
- if (! $oldpagemtime{$page}) {
+ if (! $pagemtime{$page}) {
push @add, $file;
$pagecase{lc $page}=$page;
if ($config{getctime} && -e "$config{srcdir}/$file") {
@@ -306,13 +304,13 @@ sub refresh () { #{{{
}
}
my @del;
- foreach my $page (keys %oldpagemtime) {
+ foreach my $page (keys %pagemtime) {
if (! $exists{$page}) {
debug(sprintf(gettext("removing old page %s"), $page));
push @del, $pagesources{$page};
$links{$page}=[];
$renderedfiles{$page}=[];
- $oldpagemtime{$page}=0;
+ $pagemtime{$page}=0;
prune($config{destdir}."/".$_)
foreach @{$oldrenderedfiles{$page}};
delete $pagesources{$page};
@@ -324,10 +322,12 @@ sub refresh () { #{{{
foreach my $file (@files) {
my $page=pagename($file);
- if (! exists $oldpagemtime{$page} ||
- mtime(srcfile($file)) > $oldpagemtime{$page} ||
+ my $mtime=mtime(srcfile($file));
+ if (! exists $pagemtime{$page} ||
+ $mtime > $pagemtime{$page} ||
$forcerebuild{$page}) {
debug(sprintf(gettext("scanning %s"), $file));
+ $pagemtime{$page}=$mtime;
push @changed, $file;
scan($file);
}