[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.6-388-gd8eba45

Alex Vandiver alexmv at bestpractical.com
Mon Dec 6 15:52:18 EST 2010


The branch, 3.9-trunk has been updated
       via  d8eba45ae5cddba9c9c7fa76d2062b955d36ea52 (commit)
       via  0944cddc8607f73cb3df6715131b7c3e80419cdc (commit)
       via  c7884e6b772355e5dd2b84259b22d02d9e571ab7 (commit)
       via  7f129b076f5ff087a55e59ebb9e91c812d8118b9 (commit)
       via  70cf6c5626629a4756203c6835ea638b1e38f893 (commit)
       via  c0eb022dc1ddec7467baf26c3ece12dd78c2f8fd (commit)
       via  fcb23d724cee6cf58dbd15ee8354f947de146ffb (commit)
       via  1826f20e159b63d87c0f21980f592ee2422f4b59 (commit)
       via  88d2fa854f8957b0d7f589bc14dd366424687e61 (commit)
       via  5cfe42f5303fdcabf5b25654643ed9af6b76585c (commit)
       via  88d18cde6e8fabbc6868432ddad33a89c9b13b9c (commit)
       via  96af87f6443d576adcafc1ee58684b7989bf2b98 (commit)
       via  89e6992cb066333b6485cb3645e668bc20b72946 (commit)
       via  a13aa111b176f8cf5562e5d92f3570188af1794e (commit)
       via  07407fb17635470e7085960b81d8f55e9c3e9cb7 (commit)
       via  93d684c3df7f085435537e801ec22541d7228630 (commit)
       via  5b9cc9cc62de3434a2034a173529caa44b931b60 (commit)
       via  6f79935cf4954945b4e665de32c2b3c0beba1268 (commit)
       via  6eff0bf322514d17aad350fe6f8feb3a127f1500 (commit)
       via  01fa70cbbec4fc5914b1978c693d459b40266f23 (commit)
       via  8d1edfb9c65950a1e128c763a5cfa4011e1523e5 (commit)
       via  ceae04d45e780051107bd12f012e47281cd65807 (commit)
       via  50952df8b6c4a5b24e096c66ee56a99de8721a41 (commit)
       via  b542a564397bf7f8b477b3ce072bbc1bf41104b4 (commit)
      from  6f87b8b0b22e7b9fc7480e56b05794ef994fdbe3 (commit)

Summary of changes:
 docs/timezones_in_charts.pod          |   30 ++++++++--------
 etc/RT_Config.pm.in                   |   18 ++++++++--
 lib/RT/CustomFieldValue_Overlay.pm    |   19 ++++++++++
 lib/RT/I18N.pm                        |   61 +++++++++++++++++++--------------
 lib/RT/Scrips_Overlay.pm              |   14 +++++--
 lib/RT/User_Overlay.pm                |   28 +++++++++++++--
 share/html/Admin/Elements/ShowKeyInfo |   10 +++--
 share/html/Admin/Queues/Modify.html   |   20 +++++++++--
 share/html/Admin/Users/GnuPG.html     |    6 ++-
 share/html/Ticket/ModifyAll.html      |    4 ++-
 t/api/cf_rights.t                     |   51 +++++++++++++++++++++++++++
 11 files changed, 200 insertions(+), 61 deletions(-)
 create mode 100644 t/api/cf_rights.t

- Log -----------------------------------------------------------------
commit d8eba45ae5cddba9c9c7fa76d2062b955d36ea52
Merge: 6f87b8b 0944cdd
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Dec 6 15:35:01 2010 -0500

    Merge branch '3.8-trunk' into 3.9-trunk
    
    Conflicts:
    	lib/RT/I18N.pm
    	lib/RT/User_Overlay.pm
    	share/html/Ticket/Elements/EditCustomFields
    	share/html/Ticket/ModifyAll.html

diff --cc lib/RT/I18N.pm
index 6387fd4,906bd0c..b4e05fa
--- a/lib/RT/I18N.pm
+++ b/lib/RT/I18N.pm
@@@ -319,19 -329,21 +319,21 @@@ sub DecodeMIMEWordsToUTF8 
  
  sub DecodeMIMEWordsToEncoding {
      my $str = shift;
-     my $enc = shift;
+     my $to_charset = shift;
+     my $field = shift || '';
  
-     @_ = $str =~ m/(.*?)=\?([^?]+)\?([QqBb])\?([^?]+)\?=([^=]*)/gcs;
+     my @list = $str =~ m/(.*?)=\?([^?]+)\?([QqBb])\?([^?]+)\?=([^=]*)/gcs;
 -    return ($str) unless (@list);
  
-     if ( @_ ) {
++    if ( @list ) {
      # add everything that hasn't matched to the end of the latest
      # string in array this happen when we have 'key="=?encoded?="; key="plain"'
-     $_[-1] .= substr($str, pos $str);
+     $list[-1] .= substr($str, pos $str);
  
      $str = "";
-     while (@_) {
+     while (@list) {
  	my ($prefix, $charset, $encoding, $enc_str, $trailing) =
- 	    (shift, shift, lc shift, shift, shift);
+             splice @list, 0, 5;
+         $encoding = lc $encoding;
  
          $trailing =~ s/\s?\t?$//;               # Observed from Outlook Express
  
@@@ -378,34 -393,6 +383,37 @@@
  
  	$str .= $prefix . $enc_str . $trailing;
      }
 +    }
 +
 +# handle filename*=ISO-8859-1''%74%E9%73%74%2E%74%78%74, see also rfc 2231
-     @_ = $str =~ m/(.*?\*=)([^']*?)'([^']*?)'(\S+)(.*?)(?=(?:\*=|$))/gcs;
-     if (@_) {
++    @list = $str =~ m/(.*?\*=)([^']*?)'([^']*?)'(\S+)(.*?)(?=(?:\*=|$))/gcs;
++    if (@list) {
 +        $str = '';
-         while (@_) {
++        while (@list) {
 +            my ( $prefix, $charset, $language, $enc_str, $trailing ) =
-               ( shift, shift, shift, shift, shift );
++              splice @list, 0, 5;
 +            $prefix =~ s/\*=$/=/; # remove the *
 +            $enc_str =~ s/%(\w{2})/chr hex $1/eg;
-             unless ( $charset eq $enc ) {
++            unless ( $charset eq $to_charset ) {
 +                my $orig_str = $enc_str;
++                local $@;
 +                eval {
-                     Encode::from_to( $enc_str, $charset, $enc,
++                    Encode::from_to( $enc_str, $charset, $to_charset,
 +                        Encode::FB_CROAK );
 +                };
 +                if ($@) {
 +                    $enc_str = $orig_str;
 +                    $charset = _GuessCharset($enc_str);
-                     Encode::from_to( $enc_str, $charset, $enc );
++                    Encode::from_to( $enc_str, $charset, $to_charset );
 +                }
 +            }
 +            $enc_str = qq{"$enc_str"}
-               if $enc_str =~ /[,;]/ and $enc_str !~ /^".*"$/;
++              if $enc_str =~ /[,;]/
++              and $enc_str !~ /^".*"$/
++              and (!$field || $field =~ /^(?:To$|From$|B?Cc$|Content-)/i);
 +            $str .= $prefix . $enc_str . $trailing;
 +        }
 +     }
  
      # We might have \n without trailing whitespace, which will result in
      # invalid headers.
diff --cc lib/RT/User_Overlay.pm
index bccc165,ab252bb..d7ef799
--- a/lib/RT/User_Overlay.pm
+++ b/lib/RT/User_Overlay.pm
@@@ -1195,9 -1358,9 +1195,9 @@@ sub CurrentUserCanModify 
          return (1);
      }
  
 -    #If the field is marked as an "administrators only" field, 
 -    # don\'t let the user touch it.
 +    #If the field is marked as an "administrators only" field,
 +    # don't let the user touch it.
-     elsif ( $self->_Accessible( $right, 'admin' ) ) {
+     elsif ( $self->_Accessible( $field, 'admin' ) ) {
          return (undef);
      }
  
diff --cc share/html/Ticket/ModifyAll.html
index 2339975,2190643..8cad009
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@@ -100,13 -102,40 +100,15 @@@
    </tr>
    <tr>
      <td class="label"><&|/l&>Subject</&>:</td>
-     <td class="entry"><input name="UpdateSubject" size="60" value="<%$Ticket->Subject%>" /></td>
+     <td class="entry"><input name="UpdateSubject" size="60" value="<%$Ticket->Subject%>" />
+ % $m->callback( %ARGS, CallbackName => 'AfterSubject' );
+     </td>
    </tr>
 -% if (my $TxnCFs = $Ticket->TransactionCustomFields) {
 -%    while (my $CF = $TxnCFs->Next()) {
 -<tr>
 -<td class="label"><% loc($CF->Name) %>:</td>
 -<td class="entry"><& /Elements/EditCustomField, 
 -    CustomField => $CF, 
 -    NamePrefix => "Object-RT::Transaction--CustomField-"
 -    &><em><% $CF->FriendlyType %></em>
 -</td></tr>
 -%    } # end if while
 -% } # end of if
 -% if (exists $session{'Attachments'}) {
 -<tr><td><&|/l&>Attached file</&>:</td>
 -<td>
 -<&|/l&>Check box to delete</&><br />
 -% foreach my $attach_name (keys %{$session{'Attachments'}}) {
 -<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
 -% } # end of foreach
 -</td>
 -</tr>
 -% } # end of if
  
 -  <tr>
 -    <td class="label"><&|/l&>Attach</&>:</td>
 -    <td class="entry"><input name="Attach" type="file" />
 -    <input type="submit" class="button" name="AddMoreAttach" value="<&|/l&>Add More Files</&>" />
 -    <input type="hidden" class="hidden" name="UpdateAttach" value="1" />
 -% $m->callback( %ARGS, CallbackName => 'AfterAttach' );
 -    </td>
 -  </tr>
 +  <tr><td colspan="2"><& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $Ticket &></td></tr>
 +
 +<& /Ticket/Elements/AddAttachments, %ARGS, TicketObj => $Ticket &>
 +
    <tr>
      <td class="labeltop"><&|/l&>Content</&>:</td>
      <td class="entry">

-----------------------------------------------------------------------


More information about the Rt-commit mailing list