[Bps-public-commit] r17130 - sd/trunk/lib/App/SD/Replica/hm

ruz at bestpractical.com ruz at bestpractical.com
Sat Dec 6 08:00:50 EST 2008


Author: ruz
Date: Sat Dec  6 08:00:50 2008
New Revision: 17130

Modified:
   sd/trunk/lib/App/SD/Replica/hm/PullEncoder.pm

Log:
* get rid of resolve_user_id_to_email

Modified: sd/trunk/lib/App/SD/Replica/hm/PullEncoder.pm
==============================================================================
--- sd/trunk/lib/App/SD/Replica/hm/PullEncoder.pm	(original)
+++ sd/trunk/lib/App/SD/Replica/hm/PullEncoder.pm	Sat Dec  6 08:00:50 2008
@@ -109,16 +109,6 @@
     return $res;
 }
 
-sub resolve_user_id_to_email {
-    my $self = shift;
-    my $id   = shift;
-    return undef unless ($id);
-
-    return $self->sync_source->hm->email_of($id);
-}
-
-memoize 'resolve_user_id_to_email';
-
 sub warp_list_to_old_value {
     my $self       = shift;
     my $task_value = shift || '';
@@ -159,8 +149,12 @@
             next if ( $prop->name eq '_delete' );
 
             if ( $prop->name =~ /^(?:reporter|owner|next_action_by)$/ ) {
-                $prop->old_value( $self->resolve_user_id_to_email( $prop->old_value ) );
-                $prop->new_value( $self->resolve_user_id_to_email( $prop->new_value ) );
+                $prop->old_value( $self->sync_source->user_info( 
+                    id => $prop->old_value
+                )->{'email'} );
+                $prop->new_value( $self->sync_source->user_info( 
+                    id => $prop->new_value
+                )->{'email'} );
             }
 
             # XXX, TODO, FIXME: this doesn't work any more as id stored as SOURCE_UUID-id property



More information about the Bps-public-commit mailing list