Came across this 'bug' in the version 2.0 beta, file adm/xs_style.php, line 37:

Was:
Code: [Download] [Hide] [Select]
// change "override" variable
$setoverride = request_var('setoverride', 0);
if(!empty($setoverride) && !defined('DEMO_MODE'))

The new value is written to the DB in the if statement - which will only fire if !empty(), but 0 *is* empty().

Is now:
Code: [Download] [Hide] [Select]
// change "override" variable
$setoverride = request_var('setoverride', $config['override_user_style']);
if(!defined('DEMO_MODE'))



Brainfart, sorry - you can just test for a difference:
Code: [Download] [Hide] [Select]
$setoverride = request_var('setoverride', $config['override_user_style']);
if(($setoverride != $config['override_user_style']) && !defined('DEMO_MODE'))


Since the parameter setoverride *can* legally be zero, the problem is that the code will *never* switch the flag off, but will switch the flag on, with the result (in this case) that user selected styles are premanently overridden.

I don't know what a correct fix for this would be. I remember seeing a function to check if the parameter is there, but can't remember where or what it is - that would probably be a better solution.

As it is I'm causing a database write hit every time the page is executed
- but at least it works...

John