Skip to content

Commit

Permalink
Swept the code of MT::Template::ContextHandlers and MT::Util::Captcha…
Browse files Browse the repository at this point in the history
… of all uses of $app->param.
  • Loading branch information
tima committed Aug 31, 2009
1 parent 28b45c3 commit 0441304
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/MT/Template/ContextHandlers.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ sub _hdlr_app_list_filters {
my $filters = $ctx->var("list_filters");
return '' if (ref($filters) ne 'ARRAY') || (! @$filters );
my $mode = $app->mode;
my $type = $app->param('_type');
my $type = $app->query->param('_type');
my $type_param = "";
$type_param = "&_type=" . encode_url($type) if defined $type;
return $ctx->build(<<EOT, $cond);
Expand Down Expand Up @@ -7991,7 +7991,7 @@ sub _hdlr_entries {
$args->{offset} = 0;
if (($args->{lastn} || $args->{limit}) && (my $app = MT->instance)) {
if ($app->isa('MT::App')) {
if (my $offset = $app->param('offset')) {
if (my $offset = $app->query->param('offset')) {
$args->{offset} = $offset;
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/MT/Util/Captcha.pm
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ sub validate_captcha {
my $self = shift;
my ($app) = @_;

my $token = $app->param('token');
my $code = $app->param('captcha_code');
my $token = $app->query->param('token');
my $code = $app->query->param('captcha_code');

my $from = time - EXPIRE();
MT::Session->remove({ kind => 'CA', start => [undef, $from] }, { range => { start => 1 }});
Expand Down

0 comments on commit 0441304

Please sign in to comment.