View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013435 | mantisbt | administration | public | 2011-10-24 03:46 | 2014-09-23 18:05 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.9 | ||||
Target Version | 1.2.9 | Fixed in Version | 1.2.9 | ||
Summary | 0013435: The obsolete checks should also verify configs in the db | ||||
Description | In 1.2.x, the config_obsolete() function only checks for obsolete values in config files, but not in mantis_config_table. This is because at the time obsolete.php is called from check.php, a connection to the database has not yet been established. The behavior in 1.3.x is currently undefined, as the obsolete checks are currently not executed (see 0012885) | ||||
Tags | No tags attached. | ||||
Should we depend on post install / upgrade steps to detect these rather than introducing extra queries? The other option is to only do these checks on admin login. |
|
The code is relying on existing config_get() calls so a db query would be issued only if the data is not already in the cache. The "extra queries" are not executed systematically on login, but manually when admin/check.php is run (by admin obviously). |
|
If we are only doing this as part of the post install checks, then there is no issues. |
|
Obsolete options tests with the patch (1.2.x): ------------ Test 1: defined in config_inc.php Warning: The configuration option jpgraph_antialias is now obsolete ------------ Test 2: option with new recommended option defined in config_inc.php Warning: The configuration option reminder_recipents_monitor_bug is now obsolete please use reminder_recipients_monitor_bug instead. ------------ Test 3: defined in the database Warning: The configuration option show_update is now obsolete it is currently defined in the database configuration for:
------------ Test 4: defined both in config_inc.php and in the DB Warning: The configuration option graph_colors is now obsolete it is currently defined in config_inc.php, as well as in the database configuration for:
------------ Test 5: option with multiple new recommendations, defined in DB Warning: The configuration option dummy is now obsolete it is currently defined in the database configuration for:
please see the following options: |
|
Reminder sent to: dhx David, I have implemented this improvement in both 1.2.x and 1.3.x. Would appreciate your feedback, particularly if you see any potential problems and side effects I might have overlooked, with changing the sequence in performing the checks (DB is now done before Config checks otherwise it's not possible to access the mantis_config_table). |
|
teste |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master-1.2.x 5e9b8342 2011-10-20 07:16 Details Diff |
Perform obsolete check against db config also Previously the check for usage of obsolete configuration variables was only performed against global variables (defined in config_inc.php). With this change, a more thorough verification is done, including values with an override in mantis_config_table. Detailed information about where the config option is used is printed with the warning message. Fixes 0013435 |
Affected Issues 0013435 |
|
mod - admin/check.php | Diff File | ||
mod - core/config_api.php | Diff File | ||
MantisBT: master-1.2.x 991e54be 2011-11-19 10:07 Details Diff |
Remove "$g_" prefix from obsolete config warning messages Designating config options using the "$g_" prefix in the warning messages when checking for obsolete configurations does not make sense when they are defined in the database. Removing this previx also makes the messages consistent with the new admin checks interface in 1.3. Affects issue 0013435 |
Affected Issues 0013435 |
|
mod - core/config_api.php | Diff File | ||
MantisBT: master 2ef79a9d 2011-11-19 12:29 Details Diff |
Perform obsolete check against db config also Previously the check for usage of obsolete configuration variables was only performed against global variables (defined in config_inc.php). With this change, a more thorough verification is done, including values with an override in mantis_config_table. Detailed information about where the config option is set (database and/or config_inc.php), for which user(s) and for which project(s), is printed with the warning message. To implement this functionality, it was required to alter the order in which the checks are executed by check/index.php: the DB checks must be performed before the Configuration checks, otherwise there is no DB connectivity to verify values in the config table. Fixes 0013435 |
Affected Issues 0013435 |
|
mod - admin/check/index.php | Diff File | ||
mod - core/config_api.php | Diff File |