[Rt-commit] r8039 - in rt/branches/3.7-EXPERIMENTAL-TUNIS: . lib/RT
clsung at bestpractical.com
clsung at bestpractical.com
Thu Jun 28 12:01:53 EDT 2007
Author: clsung
Date: Thu Jun 28 12:01:51 2007
New Revision: 8039
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/ (props changed)
rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Action/SendEmail.pm
rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/User_Overlay.pm
Log:
r11984 at going04: clsung | 2007-06-29 00:01:50 +0800
- use FriendlyName to resolve the problem
! no RealName is set
- also preserve further use (if we need to use email or sth to display as friendlyname)
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Action/SendEmail.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Action/SendEmail.pm Thu Jun 28 12:01:51 2007
@@ -692,8 +692,7 @@
unless ( $self->TemplateObj->MIMEObj->head->get('From') ) {
if (RT->Config->Get('UseFriendlyFromLine')) {
- my $friendly_name = $self->TransactionObj->CreatorObj->RealName
- || $self->TransactionObj->CreatorObj->Name;
+ my $friendly_name = $self->TransactionObj->CreatorObj->FriendlyName;
if ( $friendly_name =~ /^"(.*)"$/ ) { # a quoted string
$friendly_name = $1;
}
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/User_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/User_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/User_Overlay.pm Thu Jun 28 12:01:51 2007
@@ -1593,6 +1593,23 @@
# }}}
+# {{{ sub FriendlyName
+
+=head2 FriendlyName
+
+ Return the friendly name
+
+=cut
+
+sub FriendlyName {
+ my $self = shift;
+ return $self->RealName if defined($self->RealName);
+ return $self->Name if defined($self->Name);
+ return "";
+}
+
+# }}}
+
sub BasicColumns {
(
[ Name => 'User Id' ],
More information about the Rt-commit
mailing list