diff options
author | Joe Rayhawk <jrayhawk@cobain.omgwallhack.org> | 2018-09-24 23:09:57 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@cobain.omgwallhack.org> | 2018-09-24 23:09:57 -0700 |
commit | 9f5b32d7833cce9171bc0035657693c7d73afc84 (patch) | |
tree | 4424701509951cb1f78d6d078f2d60d020a33148 /pinyweb/cgi-bin/auth/newrepo.cgi | |
parent | 8e3dd1d39eced80d229ef411b193417d10067074 (diff) | |
download | piny-code-9f5b32d7833cce9171bc0035657693c7d73afc84.tar.gz piny-code-9f5b32d7833cce9171bc0035657693c7d73afc84.zip |
pinyweb: scalarizing CGI params because perl
Because not everyone wants to Perl Jam.
Diffstat (limited to 'pinyweb/cgi-bin/auth/newrepo.cgi')
-rwxr-xr-x | pinyweb/cgi-bin/auth/newrepo.cgi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pinyweb/cgi-bin/auth/newrepo.cgi b/pinyweb/cgi-bin/auth/newrepo.cgi index 94b25e9..46c5993 100755 --- a/pinyweb/cgi-bin/auth/newrepo.cgi +++ b/pinyweb/cgi-bin/auth/newrepo.cgi @@ -18,14 +18,14 @@ print( "Content-type: text/plain\n\n"); if( defined( $q->param('r') ) && defined( $q->param('d') ) ) { # repository, description @cmd = ( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'newrepo', '--batch', '--enable-ikiwiki', $q->param('r') ); - if( defined( $q->param('i') ) && $q->param('i') eq "0" ) { + if( defined( scalar( $q->param('i') ) ) && scalar( $q->param('i') ) eq "0" ) { push( @cmd, '--disable-ikiwiki' ); - } elsif( defined( $q->param('i') ) && $q->param('i') eq "1" ) { + } elsif( defined( scalar( $q->param('i') ) ) && scalar( $q->param('i') ) eq "1" ) { push( @cmd, '--enable-ikiwiki' ); }; if( defined( $q->param('s') ) ) { # source - push( @cmd, $q->param('s') ); + push( @cmd, scalar( $q->param('s') ) ); }; unless( open2( OUT, IN, @cmd ) ) { |