[Rt-commit] rt branch, 4.0/delete-user-attributes-on-reset, created. rt-4.0.4-113-g2c91955
Jason May
jasonmay at bestpractical.com
Wed Dec 7 12:34:45 EST 2011
The branch, 4.0/delete-user-attributes-on-reset has been created
at 2c91955866dd7e7b9da14c216785251f2e5e8dbb (commit)
- Log -----------------------------------------------------------------
commit 2c91955866dd7e7b9da14c216785251f2e5e8dbb
Author: Jason May <jasonmay at bestpractical.com>
Date: Wed Dec 7 12:24:38 2011 -0500
Delete the user's Pref-HomepageSettings attribute on Reset
If the user's Pref-HomepageSettings is there but not empty, it won't
respect any new changes made to the global homepage settings.
However, the fix is still not visible due to referring to session cache
checks. The preferences are checked in the session before the database,
so users will still not see homepage changes.
diff --git a/share/html/Prefs/MyRT.html b/share/html/Prefs/MyRT.html
index cfcf315..46848e1 100644
--- a/share/html/Prefs/MyRT.html
+++ b/share/html/Prefs/MyRT.html
@@ -97,7 +97,9 @@ if ( $ARGS{'UpdateSummaryRows'} ) {
$ARGS{'SummaryRows'} ||= $user->Preferences('SummaryRows', RT->Config->Get('DefaultSummaryRows'));
if ($ARGS{Reset}) {
- my ($ok, $msg) = $user->SetPreferences('HomepageSettings', {});
+ my $attr = RT::Attribute->new($session{CurrentUser});
+ $attr->LoadByNameAndObject( Object => $user, Name => 'Pref-HomepageSettings' );
+ my ($ok, $msg) = $attr->Delete;
push @results, $ok ? loc('Preferences saved.') : $msg;
delete $session{'my_rt_portlets'};
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list