diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-02 16:38:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-02 16:38:13 -0400 |
commit | c987aee47acfcc0df4c1ac2667d9c63133e99d2b (patch) | |
tree | 990aa9bf59bb7b17df797e77ba54f0a902d72acd /IkiWiki/CGI.pm | |
parent | 33b60e67a79f0929fa47a0d7b01da71c8196218f (diff) | |
parent | aaca4902dd29e7ba7769daedcc2f7ee86d1e058a (diff) |
Merge branch 'tova'
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r-- | IkiWiki/CGI.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 015c9ae01..07e92322f 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -281,7 +281,6 @@ sub cgi_editpage ($$) { #{{{ eval q{use CGI::FormBuilder}; error($@) if $@; my $form = CGI::FormBuilder->new( - title => "editpage", fields => \@fields, charset => "utf-8", method => 'POST', @@ -304,7 +303,7 @@ sub cgi_editpage ($$) { #{{{ # This untaint is safe because titlepage removes any problematic # characters. - my ($page)=$form->field('page'); + my $page=$form->field('page'); $page=titlepage(possibly_foolish_untaint($page)); if (! defined $page || ! length $page || file_pruned($page, $config{srcdir}) || $page=~/^\//) { @@ -667,10 +666,11 @@ sub cgi (;$$) { #{{{ my $q=shift; my $session=shift; + eval q{use CGI}; + error($@) if $@; + $CGI::DISABLE_UPLOADS=$config{cgi_disable_uploads}; + if (! $q) { - eval q{use CGI}; - error($@) if $@; - binmode(STDIN); $q=CGI->new; binmode(STDIN, ":utf8"); |