From ce1fd2623fd21a9b03bffa736faa9bd3656a0609 Mon Sep 17 00:00:00 2001 From: Nigel Kukard <nkukard@lbsd.net> Date: Thu, 4 Jul 2013 12:15:48 +0200 Subject: [PATCH] Migrated rest of the webserver pages to new args --- opentrafficshaper/plugins/webserver/pages/index.pm | 5 +++-- opentrafficshaper/plugins/webserver/pages/static.pm | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/opentrafficshaper/plugins/webserver/pages/index.pm b/opentrafficshaper/plugins/webserver/pages/index.pm index 3d26e8a..fc42c29 100644 --- a/opentrafficshaper/plugins/webserver/pages/index.pm +++ b/opentrafficshaper/plugins/webserver/pages/index.pm @@ -33,11 +33,12 @@ our (@ISA,@EXPORT,@EXPORT_OK); sub _catchall { - my ($globals,$module,$daction,$request) = @_; + my ($kernel,$globals,$module,$daction,$request) = @_; + + # If we not passed default by the main app, just return return if ($daction ne "default"); - # Build content my $content = ""; diff --git a/opentrafficshaper/plugins/webserver/pages/static.pm b/opentrafficshaper/plugins/webserver/pages/static.pm index 8e546e2..a2fd5a2 100644 --- a/opentrafficshaper/plugins/webserver/pages/static.pm +++ b/opentrafficshaper/plugins/webserver/pages/static.pm @@ -43,7 +43,7 @@ our (@ISA,@EXPORT,@EXPORT_OK); sub _catchall { - my ($globals,$module,$daction,$request) = @_; + my ($kernel,$globals,$module,$daction,$request) = @_; my $logger = $globals->{'logger'}; @@ -113,7 +113,7 @@ sub _catchall # Set to binary mode binmode(FH); # Suck in file - my $buffer; + my $buffer = ""; my $len; do { $len = read(FH,$buffer,4096,length($buffer)); -- GitLab