[Rt-commit] rt branch, 4.2/simple-template-cf, repushed

Alex Vandiver alexmv at bestpractical.com
Mon Jul 21 15:04:55 EDT 2014


The branch 4.2/simple-template-cf was deleted and repushed:
       was 561bf1a939559a1b81635a2dbf6f40f51b03e6ea
       now 546fc6c2c6c02afd8fad503649a06972403f0447

1:  561bf1a ! 1:  546fc6c Strip non-word characters from CF names for variable names
    @@ -2,7 +2,31 @@
     
         Strip non-word characters from CF names for variable names
         
    +    The existing Simple templates did not address the issue of CF names with
    +    spaces in them.  This strips non-word characters to establish the
    +    variable name -- a trasformation which might cause duplication of CF
    +    names, but this does not notably worsen the situation, as they did not
    +    already posess any uniqueness guarantees.
    +    
    +    Note that this may still lead to unicode variable names, as \w is UTF-8
    +    aware, allowing for the variable "$TicketCFStraße".
    +    
         Fixes I#18446.
    +
    +diff --git a/docs/customizing/templates.pod b/docs/customizing/templates.pod
    +--- a/docs/customizing/templates.pod
    ++++ b/docs/customizing/templates.pod
    +@@
    + 
    + =item $TicketCF(Name)
    + 
    +-For example, C<$TicketCFDepartment>.
    ++For example, C<$TicketCFDepartment>.  For CFs with more complicated
    ++names, all non-word characters (anything that is not letters, numbers,
    ++or underscores) are stripped to determine the appropriate variable name.
    + 
    + =item $TransactionType
    + 
     
     diff --git a/lib/RT/Template.pm b/lib/RT/Template.pm
     --- a/lib/RT/Template.pm



More information about the rt-commit mailing list