aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-27 19:58:33 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-27 19:58:33 +0000
commit3ad4d93e33284ad6d51d2fa5f9abf1943b894d48 (patch)
tree35db9dcbbd8ae422c042256ee607a503dd53f809
parentb37070d888919ae30219ce13e4d3cce359fd75e1 (diff)
downloadikiwiki-3ad4d93e33284ad6d51d2fa5f9abf1943b894d48.tar
ikiwiki-3ad4d93e33284ad6d51d2fa5f9abf1943b894d48.tar.gz
fix reference counting oops
-rw-r--r--IkiWiki/Render.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index be9403618..58556148f 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -97,11 +97,6 @@ sub preprocess ($$$) { #{{{
if (length $escape) {
return "[[$command $params]]";
}
- elsif ($preprocessing{$page}++ > 10) {
- # Avoid loops of preprocessed pages preprocessing
- # other pages that preprocess them, etc.
- return "[[$command preprocessing loop detected on $page at depth $preprocessing{$page}]]";
- }
elsif (exists $hooks{preprocess}{$command}) {
# Note: preserve order of params, some plugins may
# consider it significant.
@@ -129,6 +124,11 @@ sub preprocess ($$$) { #{{{
push @params, $val, '';
}
}
+ if ($preprocessing{$page}++ > 10) {
+ # Avoid loops of preprocessed pages preprocessing
+ # other pages that preprocess them, etc.
+ return "[[$command preprocessing loop detected on $page at depth $preprocessing{$page}]]";
+ }
my $ret=$hooks{preprocess}{$command}{call}->(
@params,
page => $page,