Bug: Session variables will override preferences listed in FINALPREFERENCES
If a preference is listed in FINALPREFERENCES, setting a session variable (with something like
SmartSessionPlugin and
SessionPlugin) will override that final preference.
Test case
Put SKIN in FINALPREFERENCES in
TWikiPreferences. Now try to set SKIN in the user's TWiki page. This SKIN will not work. Now use
SmartSessionPlugin or
SessionPlugin to set a "sticky skin." The session variable WILL override the pre-set SKIN.
This will become more important if and when I upload a version of
SmartSessionPlugin that provides a TWikiVariable that allows users to set and get session variables. Right now the problem only SEEMS to surround %SKIN% right now, until other plugins start using setSessionVariable. The changes I'm about to make will provide a plugin that gives users access to setSessionVariable.
This patch to
Prefs.pm should fix it:
<pre>
===================================================================
RCS file: Prefs.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -r1.1 -r1.2
186c186,189
< return $sessionValue;
---
> # BUG: This allows session variable to override final preference
> # return $sessionValue;
> # This should fix it
> prvAddToPrefsList( $theKey, $sessionValue );
</pre>
Environment
--
TedPavlic - 24 Aug 2003
Follow up
Fix record