X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=cgi-bin%2Fsearch_packages.pl;h=6b4a4676daa4ab3835961a04ddc83de072c70178;hb=f1043c524ddbe31acc8e2af063bd082e8c808513;hp=060602a630138142dfe39b5f0b17402b397d316b;hpb=d0086d64f40f548b3cdd63ca4223cc9bbaf70b76;p=deb%2Fpackages.git diff --git a/cgi-bin/search_packages.pl b/cgi-bin/search_packages.pl index 060602a..6b4a467 100755 --- a/cgi-bin/search_packages.pl +++ b/cgi-bin/search_packages.pl @@ -44,12 +44,18 @@ my %ARCHITECTURES = map { $_ => 1 } @ARCHITECTURES; $ENV{PATH} = "/bin:/usr/bin"; # Read in all the variables set by the form -my $input = new CGI; +my $input; +if ($ARGV[0] eq 'php') { + $input = new CGI(\*STDIN); +} else { + $input = new CGI; +} my $pet0 = new Benchmark; # use this to disable debugging in production mode completly my $debug_allowed = 1; my $debug = $debug_allowed && $input->param("debug"); +$debug = 0 if not defined($debug); $Search::Param::debug = 1 if $debug > 1; # If you want, just print out a list of all of the variables and exit.