[Rt-commit] r11849 - rt/branches/3.8-TESTING/html/Elements/RT__Queue
ruz at bestpractical.com
ruz at bestpractical.com
Wed Apr 23 16:58:50 EDT 2008
Author: ruz
Date: Wed Apr 23 16:58:48 2008
New Revision: 11849
Modified:
rt/branches/3.8-TESTING/html/Elements/RT__Queue/ColumnMap
Log:
* our $XXX in %ONCE block was a mistake. Such variables are shared between
components and can influence each other
Modified: rt/branches/3.8-TESTING/html/Elements/RT__Queue/ColumnMap
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/RT__Queue/ColumnMap (original)
+++ rt/branches/3.8-TESTING/html/Elements/RT__Queue/ColumnMap Wed Apr 23 16:58:48 2008
@@ -50,7 +50,7 @@
$Attr => undef
</%ARGS>
<%ONCE>
-our $QUEUE_COLUMN_MAP = {
+my $COLUMN_MAP = {
id => {
title => '#',
attribute => 'id',
@@ -70,21 +70,12 @@
},
};
foreach my $col(qw(Name Description CorrespondAddress CommentAddress InitialPriority FinalPriority DefaultDueIn)) {
- $QUEUE_COLUMN_MAP->{$col} = { attribute => $col, value => sub { return $_[0]->$col() } };
+ $COLUMN_MAP->{$col} = { attribute => $col, value => sub { return $_[0]->$col() } };
}
-our $ColumnMap = sub {
- my $name = shift;
- my $attr = shift;
-
- return $QUEUE_COLUMN_MAP->{$name}->{$attr}
- if $QUEUE_COLUMN_MAP->{$name};
-
-};
-
</%ONCE>
<%INIT>
-$m->callback( COLUMN_MAP => $QUEUE_COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 );
-return GetColumnMapEntry( Map => $QUEUE_COLUMN_MAP, Name => $Name, Attribute => $Attr );
+$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 );
+return GetColumnMapEntry( Map => $COLUMN_MAP, Name => $Name, Attribute => $Attr );
</%INIT>
More information about the Rt-commit
mailing list