summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorDavid Riebenbauer <davrieb@liegesta.at>2010-04-03 21:10:16 +0200
committerDavid Riebenbauer <davrieb@liegesta.at>2010-04-03 22:20:48 +0200
commit981400177d68a279f485727be3f013e68f0bf691 (patch)
tree228443b89edb0da20fe739c54d6b45aae5585863 /IkiWiki
parent628a52a6c49f5d2fc5af251f2d718c8dff5e8ed5 (diff)
Make sure deleted tag pages don't get recreated.
The reason to do this is basically a user interaction design decision. It is achieved by adding an entry, associated to the creating plugin, to %pagestate. To find out if files were deleted a new global hash %del_hash is %introduced.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/tag.pm2
-rw-r--r--IkiWiki/Render.pm5
2 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm
index c6c99ae45..fdd63d637 100644
--- a/IkiWiki/Plugin/tag.pm
+++ b/IkiWiki/Plugin/tag.pm
@@ -72,7 +72,7 @@ sub gentag ($) {
my $tagfile = newpagefile(tagpage($tag), $config{default_pageext});
$tagfile=~s/^\///;
- return if (! add_autofile($tagfile));
+ return if (! add_autofile($tagfile, "tag"));
debug(sprintf(gettext("creating tag page %s"), $tag));
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index fc71c8919..0c21455fb 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -637,12 +637,14 @@ sub refresh () {
my ($changed, $internal_changed)=find_changed($files);
run_hooks(needsbuild => sub { shift->($changed) });
my $oldlink_targets=calculate_old_links($changed, $del);
+ %del_hash = map { $_ => 1 } @{$del};
foreach my $file (@$changed) {
scan($file);
}
- while (my $autofile = shift (@autofiles)) {
+ while (my $autofile = shift @{[keys %autofiles]}) {
+ my $plugin=$autofiles{$autofile};
my $page=pagename($autofile);
if ($pages->{$page}) {
debug(sprintf(gettext("%s has multiple possible source pages"), $page));
@@ -654,6 +656,7 @@ sub refresh () {
push @{$changed}, $autofile if find_changed([$autofile]);
scan($autofile);
+ delete $autofiles{$autofile};
}
calculate_links();