[Rt-commit] r8803 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Tue Aug 28 14:46:16 EDT 2007


Author: ruz
Date: Tue Aug 28 14:46:15 2007
New Revision: 8803

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/html/Elements/RT__Ticket/ColumnMap

Log:
 r8748 at cubic-pc (orig r8747):  sartak | 2007-08-28 01:41:57 +0400
  r37461 at onn:  sartak | 2007-08-27 15:57:11 -0400
  Various fixes to the column map code
 


Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/RT__Ticket/ColumnMap
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/RT__Ticket/ColumnMap	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/RT__Ticket/ColumnMap	Tue Aug 28 14:46:15 2007
@@ -225,7 +225,7 @@
                 $_[0]->loc('New'), \'</a>';
         },
     },
-    RequestorsKey => {
+    KeyRequestors => {
         title     => 'Requestors',
         attribute => 'Requestor.EmailAddress',
         value => sub {
@@ -241,19 +241,17 @@
             return join ', ', @requestors;
         }
     },
-    OwnerNameKey => {
+    KeyOwnerName => {
         title     => 'Owner',
         attribute => 'Owner',
         value     => sub {
             my $t = shift;
-            my $email = $t->OwnerObj->EmailAddress;
-            return $email if $email eq '';
-
-            my %key = RT::Crypt::GnuPG::GetKeyInfo($email);
+            my $name = $t->OwnerObj->Name;
+            my %key = RT::Crypt::GnuPG::GetKeyInfo($t->OwnerObj->EmailAddress);
             if (!defined $key{'info'}) {
-                $email .= " (no pubkey!)";
+                $name .= " (no pubkey!)";
             }
-            return $email;
+            return $name;
         }
     },
 
@@ -302,16 +300,15 @@
 
 $TICKET_COLUMN_MAP->{'CF'} = $TICKET_COLUMN_MAP->{'CustomField'};
 
-# if no GPG support, then OwnerNameKey and RequestorsKey fall back to the regular
+# if no GPG support, then KeyOwnerName and KeyRequestors fall back to the regular
 # versions
 if (RT->Config->Get('GnuPG')->{'Enable'}) {
     require RT::Crypt::GnuPG;
 }
 else {
-    $TICKET_COLUMN_MAP->{OwnerNameKey} = $TICKET_COLUMN_MAP->{OwnerName};
-    $TICKET_COLUMN_MAP->{RequestorsKey} = $TICKET_COLUMN_MAP->{Requestors};
+    $TICKET_COLUMN_MAP->{KeyOwnerName} = $TICKET_COLUMN_MAP->{OwnerName};
+    $TICKET_COLUMN_MAP->{KeyRequestors} = $TICKET_COLUMN_MAP->{Requestors};
 }
-
 </%ONCE>
 <%init>
 $m->callback( COLUMN_MAP => $TICKET_COLUMN_MAP, CallbackName => 'Once', CallbackOnce => 1 );


More information about the Rt-commit mailing list