* inline: When previewing, still call will_render on rss/atom files,
just avoid actually writing the files. This is necessary because ikiwiki saves state after a preview (in case it actually *did* write files), and if will_render isn't called its security checks will get upset when the page is saved. Thanks to Edward Betts for his help tracking this tricky bug down.master
parent
6ab06ed7fa
commit
d1c4899a22
|
@ -95,7 +95,6 @@ sub preprocess_inline (@) { #{{{
|
|||
my $atom=($config{atom} && exists $params{atom}) ? yesno($params{atom}) : $config{atom};
|
||||
my $quick=exists $params{quick} ? yesno($params{quick}) : 0;
|
||||
my $feeds=exists $params{feeds} ? yesno($params{feeds}) : !$quick;
|
||||
$feeds=0 if $params{preview};
|
||||
my $feedonly=yesno($params{feedonly});
|
||||
if (! exists $params{show} && ! $archive) {
|
||||
$params{show}=10;
|
||||
|
@ -285,7 +284,7 @@ sub preprocess_inline (@) { #{{{
|
|||
@list=grep { pagespec_match($_, $params{feedpages}, location => $params{page}) } @list;
|
||||
}
|
||||
|
||||
if ($rss) {
|
||||
if ($rss && ! $params{preview}) {
|
||||
my $rssp=rsspage($params{destpage}).$feednum;
|
||||
will_render($params{destpage}, $rssp);
|
||||
writefile($rssp, $config{destdir},
|
||||
|
@ -293,7 +292,7 @@ sub preprocess_inline (@) { #{{{
|
|||
$toping{$params{destpage}}=1 unless $config{rebuild};
|
||||
$feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/rss+xml" title="RSS" href="$rssurl" />};
|
||||
}
|
||||
if ($atom) {
|
||||
if ($atom && ! $params{preview}) {
|
||||
my $atomp=atompage($params{destpage}).$feednum;
|
||||
will_render($params{destpage}, $atomp);
|
||||
writefile($atomp, $config{destdir},
|
||||
|
|
|
@ -27,6 +27,12 @@ ikiwiki (2.31) UNRELEASED; urgency=low
|
|||
direction. No need to pull changes when doing a commit. mtn sync
|
||||
is still called in rcs_update.
|
||||
- Support for viewing differences via patches using viewmtn.
|
||||
* inline: When previewing, still call will_render on rss/atom files,
|
||||
just avoid actually writing the files. This is necessary because ikiwiki
|
||||
saves state after a preview (in case it actually *did* write files),
|
||||
and if will_render isn't called its security checks will get upset
|
||||
when the page is saved. Thanks to Edward Betts for his help tracking this
|
||||
tricky bug down.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Sat, 02 Feb 2008 23:36:31 -0500
|
||||
|
||||
|
|
Loading…
Reference in New Issue