[Rt-commit] r11859 - in rt/branches/3.8-TESTING/html/Elements: RT__Template RT__User
ruz at bestpractical.com
ruz at bestpractical.com
Wed Apr 23 17:47:32 EDT 2008
Author: ruz
Date: Wed Apr 23 17:47:32 2008
New Revision: 11859
Modified:
rt/branches/3.8-TESTING/html/Elements/RT__Template/ColumnMap
rt/branches/3.8-TESTING/html/Elements/RT__Ticket/ColumnMap
rt/branches/3.8-TESTING/html/Elements/RT__User/ColumnMap
Log:
* return back $COLUMN_MAP everywhere so it's all consistent,
but only with my scope
Modified: rt/branches/3.8-TESTING/html/Elements/RT__Template/ColumnMap
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/RT__Template/ColumnMap (original)
+++ rt/branches/3.8-TESTING/html/Elements/RT__Template/ColumnMap Wed Apr 23 17:47:32 2008
@@ -50,7 +50,7 @@
$Attr => undef
</%ARGS>
<%ONCE>
-our $TEMPLATE_COLUMN_MAP = {
+my $COLUMN_MAP = {
id => {
title => '#',
attribute => 'id',
@@ -60,11 +60,11 @@
};
foreach my $col(qw(Name Description)) {
- $TEMPLATE_COLUMN_MAP->{ $col } = { attribute => $col, value => sub { return $_[0]->$col() } };
+ $COLUMN_MAP->{ $col } = { attribute => $col, value => sub { return $_[0]->$col() } };
}
</%ONCE>
<%INIT>
-$m->callback( COLUMN_MAP => $TEMPLATE_COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 );
-return GetColumnMapEntry( Map => $TEMPLATE_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>
Modified: rt/branches/3.8-TESTING/html/Elements/RT__Ticket/ColumnMap
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/RT__Ticket/ColumnMap (original)
+++ rt/branches/3.8-TESTING/html/Elements/RT__Ticket/ColumnMap Wed Apr 23 17:47:32 2008
@@ -52,7 +52,7 @@
<%ONCE>
-our ( $TICKET_COLUMN_MAP );
+my $COLUMN_MAP;
my $LinkCallback = sub {
my $method = shift;
@@ -74,7 +74,7 @@
}
};
-$TICKET_COLUMN_MAP = {
+$COLUMN_MAP = {
QueueName => {
attribute => 'Queue',
title => 'Queue',
@@ -305,7 +305,7 @@
},
};
-$TICKET_COLUMN_MAP->{'CF'} = $TICKET_COLUMN_MAP->{'CustomField'};
+$COLUMN_MAP->{'CF'} = $COLUMN_MAP->{'CustomField'};
# if no GPG support, then KeyOwnerName and KeyRequestors fall back to the regular
# versions
@@ -313,12 +313,13 @@
require RT::Crypt::GnuPG;
}
else {
- $TICKET_COLUMN_MAP->{KeyOwnerName} = $TICKET_COLUMN_MAP->{OwnerName};
- $TICKET_COLUMN_MAP->{KeyRequestors} = $TICKET_COLUMN_MAP->{Requestors};
+ $COLUMN_MAP->{KeyOwnerName} = $COLUMN_MAP->{OwnerName};
+ $COLUMN_MAP->{KeyRequestors} = $COLUMN_MAP->{Requestors};
}
</%ONCE>
<%init>
-$m->callback( COLUMN_MAP => $TICKET_COLUMN_MAP, CallbackName => 'Once', CallbackOnce => 1 );
-$m->callback( COLUMN_MAP => $TICKET_COLUMN_MAP, CallbackName => 'ColumnMap' );
-return GetColumnMapEntry( Map => $TICKET_COLUMN_MAP, Name => $Name, Attribute => $Attr );
+$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'Once', CallbackOnce => 1 );
+# backward compatibility
+$m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'ColumnMap' );
+return GetColumnMapEntry( Map => $COLUMN_MAP, Name => $Name, Attribute => $Attr );
</%init>
Modified: rt/branches/3.8-TESTING/html/Elements/RT__User/ColumnMap
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/RT__User/ColumnMap (original)
+++ rt/branches/3.8-TESTING/html/Elements/RT__User/ColumnMap Wed Apr 23 17:47:32 2008
@@ -50,7 +50,7 @@
$Attr => undef
</%ARGS>
<%ONCE>
-our $USER_COLUMN_MAP = {
+my $COLUMN_MAP = {
id => {
title => '#',
attribute => 'id',
@@ -62,11 +62,11 @@
foreach my $col(qw(Name RealName NickName EmailAddress Organization
HomePhone WorkPhone MobilePhone PagerPhone Address1 Address2 City State Zip Country))
{
- $USER_COLUMN_MAP->{ $col } = { attribute => $col, value => sub { return $_[0]->$col() } };
+ $COLUMN_MAP->{ $col } = { attribute => $col, value => sub { return $_[0]->$col() } };
}
</%ONCE>
<%INIT>
-$m->callback( COLUMN_MAP => $USER_COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 );
-return GetColumnMapEntry( Map => $USER_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