inline: Allow direct inclusion of non-page files in raw mode.
parent
5ccf68f113
commit
ad303e878e
|
@ -337,7 +337,7 @@ sub preprocess_inline (@) {
|
||||||
foreach my $page (@list) {
|
foreach my $page (@list) {
|
||||||
my $file = $pagesources{$page};
|
my $file = $pagesources{$page};
|
||||||
my $type = pagetype($file);
|
my $type = pagetype($file);
|
||||||
if (! $raw || ($raw && ! defined $type)) {
|
if (! $raw) {
|
||||||
if ($needcontent) {
|
if ($needcontent) {
|
||||||
# Get the content before populating the
|
# Get the content before populating the
|
||||||
# template, since getting the content uses
|
# template, since getting the content uses
|
||||||
|
@ -391,6 +391,10 @@ sub preprocess_inline (@) {
|
||||||
filter($page, $params{destpage},
|
filter($page, $params{destpage},
|
||||||
readfile(srcfile($file)))));
|
readfile(srcfile($file)))));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$ret.="\n".
|
||||||
|
readfile(srcfile($file));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low
|
||||||
only when ikiwiki needs authentication, rather than for any access to
|
only when ikiwiki needs authentication, rather than for any access to
|
||||||
the cgi/wiki.
|
the cgi/wiki.
|
||||||
* inline: Do not generated feeds for nested inlines.
|
* inline: Do not generated feeds for nested inlines.
|
||||||
|
* inline: Allow direct inclusion of non-page files in raw mode.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Fri, 06 Nov 2009 12:04:29 -0500
|
-- Joey Hess <joeyh@debian.org> Fri, 06 Nov 2009 12:04:29 -0500
|
||||||
|
|
||||||
|
|
|
@ -17,3 +17,11 @@ this situation.
|
||||||
|
|
||||||
If we explicitely don't want to allow raw inlining of unknown page
|
If we explicitely don't want to allow raw inlining of unknown page
|
||||||
types, ikiwiki should output a better error message.
|
types, ikiwiki should output a better error message.
|
||||||
|
|
||||||
|
> I have made it just do a direct include if the page type is not known, in
|
||||||
|
> raw mode. That seems useful if you want to include some other file right
|
||||||
|
> into a page. You could probably even wrap it in a format directive.
|
||||||
|
>
|
||||||
|
> It does allow including binary files right into a page, but nothing is
|
||||||
|
> stopping you pasting binary data right into the edit form either, so
|
||||||
|
> while annoying I don't think that will be a security problem. --[[Joey]]
|
||||||
|
|
Loading…
Reference in New Issue