Browse Source

minor formatting and sanity check

master
René Wagner 4 months ago
parent
commit
46ca4c42e2
  1. 3
      faqs.pl
  2. 4
      index.pl

3
faqs.pl

@ -55,7 +55,7 @@ sub faqs
my @rows = $dbh->selectall_array(sql());
if ( !scalar @rows ) {
push @return, 'No faqs found!';
push @return, ('No faqs found!', '');
}
else {
foreach (@rows) {
@ -72,7 +72,6 @@ sub faqs
}
}
$dbh->disconnect();
push @return, '';
return @return;
}

4
index.pl

@ -19,6 +19,10 @@ if (!defined($ENV{'SERVER_PROTOCOL'}) || $ENV{'SERVER_PROTOCOL'} ne 'GEMINI') {
write_response('CGI_ERROR', 'CGI execution error', undef);
}
if ($ENV{'QUERY_STRING'} ne '' || $ENV{'PATH_INFO'} ne '') {
write_response('NOT_FOUND', 'File not found', undef);
}
my @body = ();
push @body, header();
push @body, body();

Loading…
Cancel
Save