[Rt-commit] r4156 - in rt/branches/QUEBEC-EXPERIMENTAL: . html/Elements html/Ticket/Elements

jesse at bestpractical.com jesse at bestpractical.com
Wed Nov 30 15:57:08 EST 2005


Author: jesse
Date: Wed Nov 30 15:57:07 2005
New Revision: 4156

Modified:
   rt/branches/QUEBEC-EXPERIMENTAL/   (props changed)
   rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/EditCustomField
   rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/EditCustomFieldSelect
   rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments
Log:
 r19554 at truegrounds:  jesse | 2005-11-30 15:27:53 -0500
  r18121 at truegrounds:  jesse | 2005-11-02 22:40:02 -0500
   r17958 at truegrounds (orig r3989):  alexmv | 2005-10-24 17:26:18 -0400
    r6881 at zoq-fot-pik:  chmrr | 2005-10-24 17:25:14 -0400
     * Ensure custom fields keep correct fallback values; for instance, if
    "add another attachment" is clicked
   
   r18110 at truegrounds (orig r4010):  pdh | 2005-10-31 19:21:57 -0500
   Make $RT::MaxInlineBody work properly.
   
   
   r18111 at truegrounds (orig r4011):  pdh | 2005-11-01 00:43:02 -0500
   Add a missing space, before the Style Police come after me.
   
   
  
 


Modified: rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/EditCustomField
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/EditCustomField	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/EditCustomField	Wed Nov 30 15:57:07 2005
@@ -49,6 +49,10 @@
     $Values = $Object->CustomFieldValues($CustomField->id);
     $Values->Columns( qw( id CustomField ObjectType ObjectId Disabled Content ContentType ContentEncoding ) );
     $NamePrefix ||= join('-', 'Object', ref($Object), $Object->Id, 'CustomField', '');
+} elsif (not $Default) {
+    my %TOP = $m->request_args;
+    $Default = $TOP{ $NamePrefix .$CustomField->Id . '-Values' }
+            || $TOP{ $NamePrefix .$CustomField->Id . '-Value' };
 }
 my $Type = $CustomField->Type;
 

Modified: rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/EditCustomFieldSelect
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/EditCustomFieldSelect	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/EditCustomFieldSelect	Wed Nov 30 15:57:07 2005
@@ -53,7 +53,8 @@
 % if ($Values) {
             <% $Values->HasEntry($value->Name) && ($selected = 1) && 'SELECTED' %>
 % } elsif ($Default) {
-            <% ($Default eq $value->Name) && ($selected = 1) && 'SELECTED' %>
+            <% (ref $Default ? (grep {$_ eq $value->Name} @{$Default}) : ($Default eq $value->Name))
+                && ($selected = 1) && 'SELECTED' %>
 % }
             ><% $value->Name%></option>
 % }

Modified: rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments	Wed Nov 30 15:57:07 2005
@@ -95,7 +95,7 @@
 
     # If it's text
     if (   $message->ContentType =~ m{^(text|message)}i
-        && $size <= $RT::MaxInlineBody )
+        && $message->ContentLength <= $RT::MaxInlineBody )
     {
 
         if (
@@ -158,6 +158,11 @@
               . $message->Id
               . '/">' );
     }
+    elsif ( $message->ContentLength > 0 ) {
+        $m->out(
+            loc( 'Message body not shown because it is too large or is not plain text.' )
+        );
+    }
 }
 
 # }}}


More information about the Rt-commit mailing list