[Rt-commit] r13835 - in rt/3.8/trunk: .

kyoki at bestpractical.com kyoki at bestpractical.com
Mon Jul 7 14:46:22 EDT 2008


Author: kyoki
Date: Mon Jul  7 14:46:21 2008
New Revision: 13835

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/share/html/Elements/ShowUserVerbose

Log:
 r23627 at nyx:  kyoki | 2008-07-07 14:46:14 -0400
 no longer shows empty () if comment isn't defined


Modified: rt/3.8/trunk/share/html/Elements/ShowUserVerbose
==============================================================================
--- rt/3.8/trunk/share/html/Elements/ShowUserVerbose	(original)
+++ rt/3.8/trunk/share/html/Elements/ShowUserVerbose	Mon Jul  7 14:46:21 2008
@@ -46,24 +46,26 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 %# Released under the terms of version 2 of the GNU Public License
-<% $Address->format %>\
+<%$Address->format%>\
 <%INIT>
 my ($phrase, $address, $comment);
 
 if ($User) {
-$address = $User->EmailAddress;
-$phrase = $User->RealName
-    if $User->RealName && lc $User->RealName ne lc $address;
-$comment = $User->Name if lc $User->Name ne lc $address;
- $Address = Email::Address->new( $phrase, $address, "($comment)" );
-} 
-
+    $address = $User->EmailAddress;
+    $phrase  = $User->RealName
+      if $User->RealName && lc $User->RealName ne lc $address;
+    $comment = $User->Name if lc $User->Name ne lc $address;
+    $comment = "($comment)" if defined $comment and length $comment;
+    $Address = Email::Address->new( $phrase, $address, $comment );
+}
 
 $Address->comment('') if $comment && lc $Address->user eq lc $comment;
-if ( $phrase and my ($l, $r) = ($phrase =~ /^(\w+) (\w+)$/) ) {
-    $Address->phrase('') if $Address->user =~ /^\Q$l\E.\Q$r\E$/
-                        || $Address->user =~ /^\Q$r\E.\Q$l\E$/; 
+if ( $phrase and my ( $l, $r ) = ( $phrase =~ /^(\w+) (\w+)$/ ) ) {
+    $Address->phrase('')
+      if $Address->user =~ /^\Q$l\E.\Q$r\E$/
+      || $Address->user =~ /^\Q$r\E.\Q$l\E$/;
 }
+
 </%INIT>
 <%ARGS>
 $User => undef


More information about the Rt-commit mailing list