aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.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.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.pm')
-rw-r--r--IkiWiki.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 2d0f3c383..a290b479a 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -8,7 +8,7 @@ use HTML::Entities;
use URI::Escape q{uri_escape_utf8};
use open qw{:utf8 :std};
-use vars qw{%config %links %oldlinks %oldpagemtime %pagectime %pagecase
+use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase
%renderedfiles %oldrenderedfiles %pagesources %depends %hooks
%forcerebuild $gettext_obj};
@@ -672,7 +672,7 @@ sub loadindex () { #{{{
my $page=pagename($items{src}[0]);
if (! $config{rebuild}) {
$pagesources{$page}=$items{src}[0];
- $oldpagemtime{$page}=$items{mtime}[0];
+ $pagemtime{$page}=$items{mtime}[0];
$oldlinks{$page}=[@{$items{link}}];
$links{$page}=[@{$items{link}}];
$depends{$page}=$items{depends}[0] if exists $items{depends};
@@ -694,9 +694,9 @@ sub saveindex () { #{{{
my $newfile="$config{wikistatedir}/index.new";
my $cleanup = sub { unlink($newfile) };
open (OUT, ">$newfile") || error("cannot write to $newfile: $!", $cleanup);
- foreach my $page (keys %oldpagemtime) {
- next unless $oldpagemtime{$page};
- my $line="mtime=$oldpagemtime{$page} ".
+ foreach my $page (keys %pagemtime) {
+ next unless $pagemtime{$page};
+ my $line="mtime=$pagemtime{$page} ".
"ctime=$pagectime{$page} ".
"src=$pagesources{$page}";
$line.=" dest=$_" foreach @{$renderedfiles{$page}};