[Rt-commit] r14112 - in rt/branches/3.999-DANGEROUS: lib/RT

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Jul 15 05:32:46 EDT 2008


Author: sunnavy
Date: Tue Jul 15 05:32:40 2008
New Revision: 14112

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/lib/RT/SavedSearches.pm
   rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm

Log:
 r14478 at sunnavys-mb:  sunnavy | 2008-07-15 15:51:15 +0800
 little fix


Modified: rt/branches/3.999-DANGEROUS/lib/RT/SavedSearches.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/SavedSearches.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/SavedSearches.pm	Tue Jul 15 05:32:40 2008
@@ -105,8 +105,9 @@
         $self->{'objects'} = [];
         my @search_atts = $object->attributes->named('saved_search');
         foreach my $att (@search_atts) {
-            my $search = RT::SavedSearch->new( current_user => $self->current_user );
+            my $search = RT::SavedSearch->new;
             $search->load( $privacy, $att->id );
+
             next if $type && $search->type ne $type;
             push( @{ $self->{'objects'} }, $search );
         }
@@ -156,7 +157,7 @@
     my $self    = shift;
     my $privacy = shift;
 
-    return RT::SavedSearch->new( current_user => $self->current_user )->_get_object($privacy);
+    return RT::SavedSearch->new->_get_object($privacy);
 }
 
 ### Internal methods

Modified: rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm	Tue Jul 15 05:32:40 2008
@@ -82,12 +82,7 @@
     my $self  = {};
     $self->{'id'} = 0;
     bless( $self, $class );
-    if ( @_ > 1 ) {
-        $self->current_user($_[-1]);
-    }
-    else {
-        $self->current_user(@_);
-    }
+    $self->_get_current_user(@_);
 
     return $self;
 }


More information about the Rt-commit mailing list