Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
note
[git.ikiwiki.info.git]
/
IkiWiki
/
Render.pm
diff --git
a/IkiWiki/Render.pm
b/IkiWiki/Render.pm
index e5ba0079b7b74706ebc1723a9206de3de3770ba1..f9fbc801f750419c76ca301dbcaac1ec62d32aa6 100644
(file)
--- a/
IkiWiki/Render.pm
+++ b/
IkiWiki/Render.pm
@@
-62,8
+62,8
@@
sub genpage ($$) {
my $page=shift;
my $content=shift;
my $page=shift;
my $content=shift;
- run_hooks(
postscan
=> sub {
- shift->(page => $page, content => $content);
+ run_hooks(
indexhtml
=> sub {
+ shift->(page => $page,
destpage => $page,
content => $content);
});
my $templatefile;
});
my $templatefile;
@@
-84,19
+84,14
@@
sub genpage ($$) {
$template=template('page.tmpl',
blind_cache => 1);
}
$template=template('page.tmpl',
blind_cache => 1);
}
- my $actions=0;
+ my $actions=0;
if (length $config{cgiurl}) {
if (IkiWiki->can("cgi_editpage")) {
$template->param(editurl => cgiurl(do => "edit", page => $page));
$actions++;
}
if (length $config{cgiurl}) {
if (IkiWiki->can("cgi_editpage")) {
$template->param(editurl => cgiurl(do => "edit", page => $page));
$actions++;
}
- if (exists $hooks{auth}) {
- $template->param(prefsurl => cgiurl(do => "prefs"));
- $actions++;
- }
}
}
-
if (defined $config{historyurl} && length $config{historyurl}) {
my $u=$config{historyurl};
$u=~s/\[\[file\]\]/$pagesources{$page}/g;
if (defined $config{historyurl} && length $config{historyurl}) {
my $u=$config{historyurl};
$u=~s/\[\[file\]\]/$pagesources{$page}/g;
@@
-111,17
+106,10
@@
sub genpage ($$) {
$actions++;
}
}
$actions++;
}
}
-
- my @actions;
- run_hooks(pageactions => sub {
- push @actions, map { { action => $_ } }
- grep { defined } shift->(page => $page);
- });
- $template->param(actions => \@actions);
-
- if ($actions || @actions) {
+ if ($actions) {
$template->param(have_actions => 1);
}
$template->param(have_actions => 1);
}
+ templateactions($template, $page);
my @backlinks=sort { $a->{page} cmp $b->{page} } backlinks($page);
my ($backlinks, $more_backlinks);
my @backlinks=sort { $a->{page} cmp $b->{page} } backlinks($page);
my ($backlinks, $more_backlinks);
@@
-454,6
+442,7
@@
sub remove_del (@) {
}
delete $pagecase{lc $page};
}
delete $pagecase{lc $page};
+ $delpagesources{$page}=$pagesources{$page};
delete $pagesources{$page};
}
}
delete $pagesources{$page};
}
}
@@
-641,7
+630,7
@@
sub render_dependent ($$$$$$$) {
# only consider internal files
# if the page explicitly depends
# on such files
# only consider internal files
# if the page explicitly depends
# on such files
- my $internal_dep=$dep =~ /
internal
\(/;
+ my $internal_dep=$dep =~ /
(?:internal|comment|comment_pending)
\(/;
my $in=sub {
my $list=shift;
my $in=sub {
my $list=shift;
@@
-800,8
+789,8
@@
sub refresh () {
render_backlinks($backlinkchanged);
remove_unrendered();
render_backlinks($backlinkchanged);
remove_unrendered();
- if (@$del) {
- run_hooks(delete => sub { shift->(@$del) });
+ if (@$del
|| @$internal_del
) {
+ run_hooks(delete => sub { shift->(@$del
, @$internal_del
) });
}
if (%rendered) {
run_hooks(change => sub { shift->(keys %rendered) });
}
if (%rendered) {
run_hooks(change => sub { shift->(keys %rendered) });