Hi;
I just discovered that function conf_update_param (in include/functions.inc.php) updates the database, but doesn't update global variable array $conf. This creates a small bug in [extension by Eric] LCAS, as $conf is used immediately after using conf_update_param to display the new configuration. Thus the configuration shown is the old one, though parameters are properly stored in the database (and thus the displayed config is correct after updating or reloading the page).
Is this functionning intended, or shall I open a ticket in the bugtracker?
Offline
Hi
Without being intented I didn't changed it when I saw it because I guess it can cause bugs to change the behavior of the method.
But it could have been changed for 2.6 (major release, compatibility breaks, etc.)
And the solution is simple : update $conf yourself :-)
Offline
indeed we have to load_conf_from_db
Offline
That's overkill
Offline
mistic100 wrote:
That's overkill
that's only once a admin form for options is send so that's once every... months?
Offline
I didn't say it is unoptimized :-)
Personally I always build $conf['myplugin'] from config form and give it to conf_update_param
That way I am always sure what it is in DB and it clean potentially corrupted config
Offline
Well, I chose to build $conf['LoginCaseAccentsSensitivity'] before updating the DB...
But I think that for version 2.7, it would be logical to update $conf in function conf_update_param...
Thanks!
Offline
Offline