[Rt-commit] rt branch, admin_ui, updated. 8bf5e75f836c0156853daad4787d020d3b94a9ef

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Jan 15 03:18:19 EST 2010


The branch, admin_ui has been updated
       via  8bf5e75f836c0156853daad4787d020d3b94a9ef (commit)
      from  4beb300e9a5172302e6bfad57e35e451e3ad8a28 (commit)

Summary of changes:
 lib/RT/Action/ConfigMyRT.pm |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit 8bf5e75f836c0156853daad4787d020d3b94a9ef
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jan 15 16:18:12 2010 +0800

    control flow fix for ConfigMyRT action

diff --git a/lib/RT/Action/ConfigMyRT.pm b/lib/RT/Action/ConfigMyRT.pm
index a4cb490..2f6c581 100644
--- a/lib/RT/Action/ConfigMyRT.pm
+++ b/lib/RT/Action/ConfigMyRT.pm
@@ -80,14 +80,14 @@ sub take_action {
     if ( $self->argument_value('reset') && $record_class ne 'RT::System' ) {
         $self->record->set_preferences('HomepageSettings', {});
     }
-    elsif ($self->argument_value('summary_rows')
-        && $record_class ne 'RT::System' )
-    {
-        my $value = int $self->argument_value('summary_rows');
-        $value = 0 if $value < 0;
-        $self->record->set_preferences( 'SummaryRows', $value );
-    }
     else {
+        if (   $self->argument_value('summary_rows')
+            && $record_class ne 'RT::System' )
+        {
+            my $value = int $self->argument_value('summary_rows');
+            $value = 0 if $value < 0;
+            $self->record->set_preferences( 'SummaryRows', $value );
+        }
 
         my $content = $self->default_value || {};
         for my $arg ( $self->argument_names ) {

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


More information about the Rt-commit mailing list