Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Suspected bug in per-user set_pref()
Expected outcome: altering a per-user pref of one user changes the pref for that user only.
Actual outcome: altering a per-user pref of one user changes the same pref for all users.
Steps to reproduce:
- Create 2 user accounts
- Log into TXP in two browsers, once with each account
- Visit the Articles list with both accounts
- Alter the sort order with one of the accounts
- Refresh the browser window of the other account: the sort order has changed to that of the other user
Fix: In txplib_misc.php, if the pref does not exist, safe_insert() creates it with a user_name. But if it is subsequently changed, the safe_update() does not take user_name into account and thus changes all such-named prefs.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Suspected bug in per-user set_pref()
Thanks for the report. Fixed in r3208.
Offline