diff options
author | intrigeri <intrigeri@boum.org> | 2009-01-27 00:19:41 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2009-01-27 00:25:46 +0100 |
commit | ca9e45c3ba2ad852123aeb8783eed07ed73ce00c (patch) | |
tree | 22facf60c5603f66c68b7e5a88107b81c50d6526 /IkiWiki/Plugin | |
parent | 03ab2623194009bf3cb82747c59dbf565b89e7bf (diff) |
po: make the "backlinks involve dependencies" feature optional
It can now be configured with the po_strictly_refresh_backlinks setting.
Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/po.pm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 230ecbb8d..6f716a91f 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -126,6 +126,13 @@ sub getsetup () { safe => 1, rebuild => 1, }, + po_strictly_refresh_backlinks => { + type => "boolean", + example => 1, + description => "refresh a page when a backlinked page is changed (can hit performance)", + safe => 1, + rebuild => 1, + }, } sub checkconfig () { @@ -166,6 +173,10 @@ sub checkconfig () { ! defined $config{po_translation_status_in_links}) { $config{po_translation_status_in_links}=1; } + if (! exists $config{po_strictly_refresh_backlinks} || + ! defined $config{po_strictly_refresh_backlinks}) { + $config{po_strictly_refresh_backlinks}=1; + } push @{$config{wiki_file_prune_regexps}}, qr/\.pot$/; } @@ -307,8 +318,10 @@ sub pagetemplate (@) { sub postscan (@) { my %params = @_; - my $page = $params{page}; + return unless $config{po_strictly_refresh_backlinks}; + + my $page = $params{page}; # backlinks involve back-dependencies, so that nicepagetitle effects, # such as translation status displayed in links, are updated use IkiWiki::Render; |