summaryrefslogtreecommitdiff
path: root/cgi/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-08-28 22:26:43 +0200
committerDaniel Friesel <derf@finalrewind.org>2013-08-28 22:26:43 +0200
commit3b165567f4755ea3bd65d7e0bf05280458c53624 (patch)
tree501fd7c33bd10a7005b72c217ba0487f8638c577 /cgi/index.pl
parentc69fc4e88af0bfe12c9b4f589309a6e12e5fefc9 (diff)
fix no_lines default
Diffstat (limited to 'cgi/index.pl')
-rw-r--r--cgi/index.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/cgi/index.pl b/cgi/index.pl
index 0850243..2ec5342 100644
--- a/cgi/index.pl
+++ b/cgi/index.pl
@@ -78,7 +78,7 @@ sub handle_request {
my $no_lines = $self->param('no_lines');
- if ( $no_lines < 1 or $no_lines > 10 ) {
+ if (not $no_lines or $no_lines < 1 or $no_lines > 10 ) {
$no_lines = $default{no_lines};
}
@@ -148,7 +148,7 @@ sub render_image {
my $dt_now = DateTime->now( time_zone => 'Europe/Berlin' );
my $color = $self->param('color') || '255,208,0';
- my $no_lines = $self->param('no_lines');
+ my $no_lines = $self->param('no_lines') // $default{no_lines};
my $backend = $self->param('backend');
my $scale = $self->param('scale');