else {
my $fh=$q->upload('attachment');
if (! defined $fh || ! ref $fh) {
- error("failed to get filehandle");
+ # needed by old CGI versions
+ $fh=$q->param('attachment');
+ if (! defined $fh || ! ref $fh) {
+ error("failed to get filehandle");
+ }
}
binmode($fh);
writefile($filename, $config{srcdir}, undef, 1, sub {
* attachment: Fix an uninitialised value warning when editing a page
that currently has no attachments.
* Fix a bug with links to pages whose names contained colons.
+ * attachment: Support old versions of CGI.pm that lack an upload method.
-- Joey Hess <joeyh@debian.org> Mon, 07 Jul 2008 01:52:48 -0400