From 9f5b32d7833cce9171bc0035657693c7d73afc84 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Mon, 24 Sep 2018 23:09:57 -0700 Subject: pinyweb: scalarizing CGI params because perl Because not everyone wants to Perl Jam. --- pinyweb/cgi-bin/auth/newrepo.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pinyweb/cgi-bin/auth/newrepo.cgi') 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 ) ) { -- cgit v1.2.3