[Bps-public-commit] RT-Extension-MergeUsers branch, master, updated. 0.04_01-4-gd2d045e

Ruslan Zakirov ruz at bestpractical.com
Mon Jun 7 16:27:49 EDT 2010


The branch, master has been updated
       via  d2d045ed02595db59a69f74eafac78080e09623b (commit)
       via  dd15457af8efdc569ac46caa45ef670e8c21d0fa (commit)
      from  da0f8ac37248db37f6214c8c8befd36dae4360f2 (commit)

Summary of changes:
 lib/RT/Extension/MergeUsers.pm |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit dd15457af8efdc569ac46caa45ef670e8c21d0fa
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Jun 8 00:26:10 2010 +0400

    cut POD to make module return true value on load

diff --git a/lib/RT/Extension/MergeUsers.pm b/lib/RT/Extension/MergeUsers.pm
index ff3ecb5..95b188c 100644
--- a/lib/RT/Extension/MergeUsers.pm
+++ b/lib/RT/Extension/MergeUsers.pm
@@ -352,4 +352,6 @@ Alex Vandiver E<lt>alexmv at bestpractical.comE<gt>
 
 GPL version 2.
 
+=cut
+
 1;

commit d2d045ed02595db59a69f74eafac78080e09623b
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Jun 8 00:27:10 2010 +0400

    clean cache on merge

diff --git a/lib/RT/Extension/MergeUsers.pm b/lib/RT/Extension/MergeUsers.pm
index 95b188c..340f1b6 100644
--- a/lib/RT/Extension/MergeUsers.pm
+++ b/lib/RT/Extension/MergeUsers.pm
@@ -226,6 +226,9 @@ sub MergeInto {
     return (0, "User @{[$canonical_self->Name]} has already been merged")
            if defined $new and $new->Content == $canonical_self->id;
 
+    # clean the cache
+    delete $EFFECTIVE_ID_CACHE{$self->id};
+
     # do the merge
     $canonical_self->SetAttribute(
         Name => "EffectiveId",
@@ -255,7 +258,7 @@ sub UnMerge {
 
     # flush the cache, or the Sets below will
     # clobber $self
-    delete $EFFECTIVE_ID_CACHE{$self->Id};
+    delete $EFFECTIVE_ID_CACHE{$self->id};
 
     my $merge = RT::User->new($RT::SystemUser);
     $merge->Load( $current->Content );

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



More information about the Bps-public-commit mailing list