[Rt-commit] r11444 - in rtfm/branches/2.3-EXPERIMENTAL: html/Callbacks/RTFM/Elements/MessageBox
falcone at bestpractical.com
falcone at bestpractical.com
Thu Apr 3 17:36:40 EDT 2008
Author: falcone
Date: Thu Apr 3 17:36:36 2008
New Revision: 11444
Modified:
rtfm/branches/2.3-EXPERIMENTAL/ (props changed)
rtfm/branches/2.3-EXPERIMENTAL/html/Callbacks/RTFM/Elements/MessageBox/Default
Log:
r30911 at ketch: falcone | 2008-04-03 16:46:27 -0400
* use caller_args to avoid having to pass %ARGS everywhere
Modified: rtfm/branches/2.3-EXPERIMENTAL/html/Callbacks/RTFM/Elements/MessageBox/Default
==============================================================================
--- rtfm/branches/2.3-EXPERIMENTAL/html/Callbacks/RTFM/Elements/MessageBox/Default (original)
+++ rtfm/branches/2.3-EXPERIMENTAL/html/Callbacks/RTFM/Elements/MessageBox/Default Thu Apr 3 17:36:36 2008
@@ -46,20 +46,21 @@
%#
%# END BPS TAGGED BLOCK }}}
<%INIT>
-foreach my $arg ( keys %ARGS ) {
+my $parent_args = $m->caller_args(-1);
+foreach my $arg ( keys %$parent_args ) {
my $article;
- if ($arg eq 'RTFM-Include-Article' && $ARGS{$arg} ) {
+ if ($arg eq 'RTFM-Include-Article' && $parent_args->{$arg} ) {
$article = RT::FM::Article->new($session{'CurrentUser'});
- $article->Load($ARGS{$arg});
+ $article->Load($parent_args->{$arg});
} elsif ( $arg =~ /^RTFM-Include-Article-(\d+)$/ ) {
$article = RT::FM::Article->new($session{'CurrentUser'});
$article->Load($1);
- } elsif ( $arg =~ /^RTFM-Include-Article-Named/ && $ARGS{ $arg } ) {
+ } elsif ( $arg =~ /^RTFM-Include-Article-Named/ && $parent_args->{ $arg } ) {
$article = RT::FM::Article->new($session{'CurrentUser'});
- if ( $ARGS{$arg} =~ /\D/ ) {
- $article->LoadByCols( Name => $ARGS{ $arg } );
+ if ( $parent_args->{$arg} =~ /\D/ ) {
+ $article->LoadByCols( Name => $parent_args->{ $arg } );
} else {
- $article->LoadByCols( id => $ARGS{ $arg } );
+ $article->LoadByCols( id => $parent_args->{ $arg } );
}
}
next unless $article && $article->id;
More information about the Rt-commit
mailing list