run_hooks(linkify => sub {
$content=shift->(
page => $page,
- destpage => $page,
+ destpage => $destpage,
content => $content,
);
});
if (exists $pagestate{$page}) {
foreach my $id (@hookids) {
foreach my $key (keys %{$pagestate{$page}{$id}}) {
- $line.=' '.$id.'_'.encode_entities($key)."=".encode_entities($pagestate{$page}{$id}{$key}, " \t\n");
+ $line.=' '.$id.'_'.encode_entities($key, " \t\n")."=".encode_entities($pagestate{$page}{$id}{$key}, " \t\n");
}
}
}
my $page=shift;
my $pagespec=shift;
+ return unless pagespec_valid($pagespec);
+
if (! exists $depends{$page}) {
$depends{$page}=$pagespec;
}
return $ret;
} #}}}
+sub pagespec_valid ($) { #{{{
+ my $spec=shift;
+
+ # used by generated code
+ my $page="";
+ my @params;
+
+ eval pagespec_translate($spec);
+ return ! $@;
+} #}}}
+
package IkiWiki::FailReason;
use overload ( #{{{