diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-10-23 18:05:12 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-10-23 18:05:12 -0400 |
commit | f349e4ef36d0653c779872d9eb8dca94e6c15d90 (patch) | |
tree | c1deab3f3519ba511458d1d808bf49bf98cd9ce4 /IkiWiki | |
parent | ad9e443f22a139c71f0cd05885cda3e418f27567 (diff) | |
download | ikiwiki-f349e4ef36d0653c779872d9eb8dca94e6c15d90.tar ikiwiki-f349e4ef36d0653c779872d9eb8dca94e6c15d90.tar.gz |
fix calls to check_*
These throw errors, do not have useful return codes.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Receive.pm | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/IkiWiki/Receive.pm b/IkiWiki/Receive.pm index 4d437cf78..33f548a14 100644 --- a/IkiWiki/Receive.pm +++ b/IkiWiki/Receive.pm @@ -22,7 +22,6 @@ sub trusted () { #{{{ sub test () { #{{{ exit 0 if trusted(); - IkiWiki::rcs_test_receive(); # Dummy up a cgi environment to use when calling check_canedit # and friends. @@ -31,20 +30,19 @@ sub test () { #{{{ my $cgi=CGI->new; require IkiWiki::CGI; my $session=IkiWiki::cgi_getsession($cgi); - my $user=getuser(); - $session->param("name", $user); + $session->param("name", getuser()); $ENV{REMOTE_ADDR}='unknown' unless exists $ENV{REMOTE_ADDR}; - lockwiki(); - loadindex(); + IkiWiki::lockwiki(); + IkiWiki::loadindex(); my %newfiles; foreach my $change (IkiWiki::rcs_receive()) { # This untaint is safe because we check file_pruned and # wiki_file_regexp. - my $file=$change->{file}=~/$config{wiki_file_regexp}/; - $file=possibly_foolish_untaint($file); + my ($file)=$change->{file}=~/$config{wiki_file_regexp}/; + $file=IkiWiki::possibly_foolish_untaint($file); if (! defined $file || ! length $file || IkiWiki::file_pruned($file, $config{srcdir})) { error(gettext("bad file name")); |