X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FRoot.pm;h=f1b020a0779eada5a0f203add13251ec975c5bf4;hb=25cfbba80f992bd251751782e30cb8c3d57b53d3;hp=5faa024d2567b5c72c0c55aa82262dfd69d367ee;hpb=f3cd955b85092ea418d9c1de90be49c9f598527f;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/Root.pm b/lib/NDWeb/Controller/Root.pm index 5faa024..f1b020a 100644 --- a/lib/NDWeb/Controller/Root.pm +++ b/lib/NDWeb/Controller/Root.pm @@ -105,10 +105,14 @@ UPDATE sms SET status = $2, cost = $3 WHERE msgid = $1 }); - $sms->execute($c->req->param('apiMsgId') - ,$clickatellstatus{$c->req->param('status')} - ,$c->req->param('charge') - ,$c->req->param('timestamp')); + my $apiMsgId = $c->req->param('apiMsgId'); + my $status = $c->req->param('status'); + my $charge = $c->req->param('charge'); + my $timestamp = $c->req->param('timestamp'); + $sms->execute($apiMsgId + ,$clickatellstatus{$status} + ,$charge + ,$timestamp); } @@ -220,6 +224,10 @@ sub end : ActionClass('RenderView') { $c->stash->{template} = 'access_denied.tt2'; $c->res->status(403); $c->clear_errors; + }elsif ($c->error->[0] =~ m/No logged in user, and none supplied as argument/){ + $c->stash->{template} = 'access_denied.tt2'; + $c->res->status(403); + $c->clear_errors; } }