[Rt-commit] r2195 - in rt/branches/3.4-RELEASE: . html/Admin/Elements html/Elements html/Ticket html/Ticket/Elements lib/RT lib/RT/Action lib/RT/Interface

jesse at bestpractical.com jesse at bestpractical.com
Mon Feb 7 12:22:17 EST 2005


Author: jesse
Date: Mon Feb  7 12:22:15 2005
New Revision: 2195

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/html/Admin/Elements/SelectScripAction
   rt/branches/3.4-RELEASE/html/Admin/Elements/SelectScripCondition
   rt/branches/3.4-RELEASE/html/Elements/Submit
   rt/branches/3.4-RELEASE/html/Ticket/Display.html
   rt/branches/3.4-RELEASE/html/Ticket/Elements/ShowMessageStanza
   rt/branches/3.4-RELEASE/html/Ticket/Elements/ShowTransaction
   rt/branches/3.4-RELEASE/html/Ticket/Elements/Tabs
   rt/branches/3.4-RELEASE/lib/RT/Action/CreateTickets.pm
   rt/branches/3.4-RELEASE/lib/RT/Interface/Web.pm
   rt/branches/3.4-RELEASE/lib/RT/Record.pm
Log:
 r4102 at hualien:  jesse | 2005-02-07T17:20:01.069833Z
 RT-Ticket: 6415
 RT-Status: resolved
 RT-Update: correspond
 
 A bunch of small fixes to avoid minor warnings in the RT code. --Dave Rolsky
 
 
 


Modified: rt/branches/3.4-RELEASE/html/Admin/Elements/SelectScripAction
==============================================================================
--- rt/branches/3.4-RELEASE/html/Admin/Elements/SelectScripAction	(original)
+++ rt/branches/3.4-RELEASE/html/Admin/Elements/SelectScripAction	Mon Feb  7 12:22:15 2005
@@ -45,11 +45,11 @@
 %# END BPS TAGGED BLOCK }}}
 <SELECT NAME=<%$Name%>>
 <OPTION VALUE="" 
-<% $Default eq undef && 'SELECTED' %>
+<% ! defined $Default && 'SELECTED' %>
 >-</OPTION>
 %while  (my $ScripAction = $ScripActions->Next) {
 <OPTION VALUE=<%$ScripAction->Id%>
-<% $ScripAction->Id == $Default && 'SELECTED' %>
+<% defined $Default && $ScripAction->Id == $Default && 'SELECTED' %>
 ><% loc($ScripAction->Name) %>
 </OPTION>
 %}

Modified: rt/branches/3.4-RELEASE/html/Admin/Elements/SelectScripCondition
==============================================================================
--- rt/branches/3.4-RELEASE/html/Admin/Elements/SelectScripCondition	(original)
+++ rt/branches/3.4-RELEASE/html/Admin/Elements/SelectScripCondition	Mon Feb  7 12:22:15 2005
@@ -45,11 +45,11 @@
 %# END BPS TAGGED BLOCK }}}
 <SELECT NAME=<%$Name%>>
 <OPTION VALUE="" 
-<% $Default eq undef && 'SELECTED' %>
+<% ! defined $Default && 'SELECTED' %>
 >-</OPTION>
 %while  (my $ScripCondition = $ScripConditions->Next) {
 <OPTION VALUE=<%$ScripCondition->Id%>
-<% $ScripCondition->Id == $Default && 'SELECTED' %>
+<% defined $Default && $ScripCondition->Id == $Default && 'SELECTED' %>
 ><% loc($ScripCondition->Name) %>
 </OPTION>
 %}

Modified: rt/branches/3.4-RELEASE/html/Elements/Submit
==============================================================================
--- rt/branches/3.4-RELEASE/html/Elements/Submit	(original)
+++ rt/branches/3.4-RELEASE/html/Elements/Submit	Mon Feb  7 12:22:15 2005
@@ -91,7 +91,7 @@
 </TABLE>
 <%ARGS>
 $color => "#336699"
-$Caption => undef
+$Caption => ''
 $AlternateCaption => undef
 $AlternateLabel => undef
 $Label => loc('Submit')

Modified: rt/branches/3.4-RELEASE/html/Ticket/Display.html
==============================================================================
--- rt/branches/3.4-RELEASE/html/Ticket/Display.html	(original)
+++ rt/branches/3.4-RELEASE/html/Ticket/Display.html	Mon Feb  7 12:22:15 2005
@@ -124,10 +124,11 @@
 	}
     }
 
-    $ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
+    $ARGS{'UpdateContent'} =~ s/\r\n/\n/g if defined $ARGS{'UpdateContent'};
     if ( $ARGS{'UpdateTimeWorked'} ||
 	 $session{'Attachments'} || 
-	 (   $ARGS{'UpdateContent'} ne ''
+	 (   defined $ARGS{'UpdateContent'}
+             && $ARGS{'UpdateContent'} ne ''
 	     && $ARGS{'UpdateContent'} ne "-- \n"
 	     . $session{'CurrentUser'}->UserObj->Signature )) {
 	$ARGS{UpdateAttachments} = $session{'Attachments'};

Modified: rt/branches/3.4-RELEASE/html/Ticket/Elements/ShowMessageStanza
==============================================================================
--- rt/branches/3.4-RELEASE/html/Ticket/Elements/ShowMessageStanza	(original)
+++ rt/branches/3.4-RELEASE/html/Ticket/Elements/ShowMessageStanza	Mon Feb  7 12:22:15 2005
@@ -57,7 +57,7 @@
         my $content = $stanza->{raw};
         RT::Interface::Web::EscapeUTF8(\$content);
         $m->comp('/Elements/Callback', content => \$content, %ARGS);
-                $content =~ s/\n/<br>/gi;
+                $content =~ s/\n/<br>/gi if defined $content;
 
 </%perl>
 <%$content |n%><br>

Modified: rt/branches/3.4-RELEASE/html/Ticket/Elements/ShowTransaction
==============================================================================
--- rt/branches/3.4-RELEASE/html/Ticket/Elements/ShowTransaction	(original)
+++ rt/branches/3.4-RELEASE/html/Ticket/Elements/ShowTransaction	Mon Feb  7 12:22:15 2005
@@ -117,6 +117,7 @@
 if ( $Ticket->Id != $Transaction->Ticket ) {
     $TicketString = "Ticket " . $Transaction->Ticket . ": ";
 }
+$TicketString ||= '';
 
 if ( $Transaction->TimeTaken != 0 ) {
     $TimeTaken = $Transaction->TimeTaken . " min";

Modified: rt/branches/3.4-RELEASE/html/Ticket/Elements/Tabs
==============================================================================
--- rt/branches/3.4-RELEASE/html/Ticket/Elements/Tabs	(original)
+++ rt/branches/3.4-RELEASE/html/Ticket/Elements/Tabs	Mon Feb  7 12:22:15 2005
@@ -187,6 +187,7 @@
     Order   => $ARGS{'Order'}   || $session{'CurrentSearchHash'}->{'Order'},
     Rows    => $ARGS{'Rows'},
   ) if ($ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'});
+$args ||= '';
 
 $tabs->{"f"} = { path      => "Search/Build.html?NewQuery=1",
                  title     => loc('New Query')};

Modified: rt/branches/3.4-RELEASE/lib/RT/Action/CreateTickets.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Action/CreateTickets.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Action/CreateTickets.pm	Mon Feb  7 12:22:15 2005
@@ -213,7 +213,7 @@
 
 Fields marked with an * are required.
 
-Fields marked with a + man have multiple values, simply
+Fields marked with a + may have multiple values, simply
 by repeating the fieldname on a new line with an additional value.
 
 Fields marked with a ! are postponed to be processed after all

Modified: rt/branches/3.4-RELEASE/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Interface/Web.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Interface/Web.pm	Mon Feb  7 12:22:15 2005
@@ -77,6 +77,7 @@
 
 sub EscapeUTF8  {
         my  $ref = shift;
+        return unless defined $$ref;
         my $val = $$ref;
         use bytes;
         $val =~ s/&/&#38;/g;

Modified: rt/branches/3.4-RELEASE/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Record.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Record.pm	Mon Feb  7 12:22:15 2005
@@ -1749,7 +1749,7 @@
     # If we've been handed a value that contains at least one non-digit,
     # it's a name.  Resolve it into an id.
     #
-    if ( $field =~ /\D+/ ) {
+    if ( defined $field && $field =~ /\D+/ ) {
 
         # Look up the field ID.
         my $cfs = RT::CustomFields->new( $self->CurrentUser );


More information about the Rt-commit mailing list