Menu

#1633 User Preferences reset should clear the value in pma__userconfig

Needs_decision
open
None
Normal
2015-04-28
2015-04-01
No

Say a user sets a configuration value through the User Preferences feature (the Settings tab), then decides to set a different value in config.inc.php. I expect that when they go to the Settings tab and press the green "reset to default" icon, that this setting is completely removed from the pma__userconfig database so that the value is used from from config.inc.php (or config.default.php if not explicitly set by the user); however what seems to occur is that the official default value is forced in to the database. The end result is that the user could have user preferences showing they've reset the default, but still overriding 'config.inc.php'.

Discussion

  • Isaac Bennetch

    Isaac Bennetch - 2015-04-01

    Note that in order to reproduce the problem, you must have a non-default setting in config.inc.php; then the user preference feature will force the "official" default setting in to pmauserconfig. In the case that there is no setting in config.inc.php, the setting is properly removed from pmauserconfig.

    I believe we should remove it in this case so that the local modifications to config.inc.php become the default.

     
  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne
     
  • Madhura Jayaratne

    green "reset to default" icon? Is this the 'Reset' button in 'Reset' div under 'Manage your settings' sub tab in 'Settings' page?

    When I click this button saved user configs are deleted from the database. However on the next request a couple of setting such as 'collation_connection' and 'fontsize' (if you have a different font size) is saved to the pma database.

    However, I do not see default values for configurations set in config.inc.php being saved to the pma dabase.

     
  • Madhura Jayaratne

    Any feedback?

     
  • Isaac Bennetch

    Isaac Bennetch - 2015-04-25

    The value I'm specifically having trouble with and using for testing is LoginCookieValidity.

    No, it's the <a class="restore-default"... in, for instance, the "Features" tab.

     
  • Madhura Jayaratne

    The semantics of the 'restore default value' is little different it seems. When the user clicks restore it sets the default value (1440 in this case) in the input field. Now when the user saves, to retain 1440, the system has to record it in pmauserconfig since the user have a different value in your config.inc.php. If the user did not have a different value in config.inc.php it will not save into pmauserconfig. I think this is reasonable since the user is trying to save 1440 here.

    But your requirement is different. It's more of 'remove saved configuration value' rather than 'restore to default value'. May be another button?