[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.3-168-g1aaeb2c

Alex Vandiver alexmv at bestpractical.com
Fri Apr 25 20:03:42 EDT 2014


The branch, 4.2-trunk has been updated
       via  1aaeb2cad272a62b05eb7679483f555771e0337e (commit)
      from  618b21cb42a2449fb2c14f0e1218d9e24352a42f (commit)

Summary of changes:
 lib/RT/Attribute.pm | 6 ++++++
 1 file changed, 6 insertions(+)

- Log -----------------------------------------------------------------
commit 1aaeb2cad272a62b05eb7679483f555771e0337e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Apr 25 20:01:53 2014 -0400

    Update the preferences cache when an attribute is deleted
    
    This parallels the action taken in SetContent, which clears the cache
    when a value is updated.

diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
index 797e22e..a39601a 100644
--- a/lib/RT/Attribute.pm
+++ b/lib/RT/Attribute.pm
@@ -385,6 +385,12 @@ sub Delete {
     unless ($self->CurrentUserHasRight('delete')) {
         return (0,$self->loc('Permission Denied'));
     }
+
+    if ( $self->__Value('ObjectType') eq 'RT::User' ) {
+        delete $RT::User::PREFERENCES_CACHE
+            { $self->__Value('ObjectId') }{ $self->__Value('Name') };
+    }
+
     return($self->SUPER::Delete(@_));
 }
 

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


More information about the rt-commit mailing list