[Rt-commit] rt branch, 4.2/scripstage-queue-columnmap-i18n, repushed

Wallace Reis wreis at bestpractical.com
Wed May 21 08:17:19 EDT 2014


The branch 4.2/scripstage-queue-columnmap-i18n was deleted and repushed:
       was 9d3e5a03f778a3754569c9c708f2f76c6e275313
       now 8b21dd5d05a112319ebaac3da2fce0d3afb8ea03

1:  9d3e5a0 ! 1:  8b21dd5 I#28739: ScripStage leaks internal value
    @@ -56,15 +56,14 @@
     +sub FriendlyStage {
     +    my ( $class, $stage ) = @_;
     +    my $stage_i18n_lookup = {
    -+        TransactionCreate => 'Normal',
    -+        UseTransactionBatch => 'Batch',
    -+        TransactionBatch => 'Batch (disabled by config)',
    ++        TransactionCreate => 'Normal', # loc
    ++        TransactionBatch => 'Batch', # loc
    ++        TransactionBatchDisabled => 'Batch (disabled by config)', # loc
     +    };
    -+    my $stage_prefix = RT->Config->Get('UseTransactionBatch')
    -+        ? 'Use'
    -+        : q{};
    -+    return $stage_i18n_lookup->{ $stage_prefix . $stage }
    -+        || $stage_i18n_lookup->{ $stage };
    ++    $stage = 'TransactionBatchDisabled'
    ++        if $stage eq 'TransactionBatch'
    ++            and not RT->Config->Get('UseTransactionBatch');
    ++    return $stage_i18n_lookup->{$stage};
     +}
      
      =head2 Apply { TicketObj => undef, TransactionObj => undef}
    @@ -87,7 +86,7 @@
      <% ($value eq $Default) && qq[ selected="selected"] |n %>
      <% ($value eq 'TransactionBatch' and not RT->Config->Get('UseTransactionBatch')) && qq[ disabled ] %>
     -><% loc($display) %>
    -+><&|/l&><% RT::Scrip->FriendlyStage($value) | n %></&>
    ++><% loc( RT::Scrip->FriendlyStage($value) ) %>
      </option>
      
      % }
    @@ -132,7 +131,8 @@
     +        title => 'Stage', # loc
     +        value => sub {
     +            my $os = RT::ObjectScrip->new( $_[0]->CurrentUser );
    -+            $os->LoadByCols( Scrip => $_[-1], ObjectId => $_[0]->id );
    ++            my $id = $_[0]->IsGlobal ? 0 : $_[-1];
    ++            $os->LoadByCols( Scrip =>  $_[0]->id, ObjectId => $id );
     +            return $_[0]->loc( $os->FriendlyStage );
     +        },
     +    },



More information about the rt-commit mailing list