Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0013435mantisbtadministrationpublic2014-09-23 18:05
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.9 
Target Version1.2.9Fixed in Version1.2.9 
Summary0013435: 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)

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
related to 0012885 closeddregad Reimplement obsolete configuration checks based on obsolete.php as part of new admin/check/ interface 

Activities

vboctor

vboctor

2011-10-24 04:20

manager   ~0030034

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.

dregad

dregad

2011-10-24 04:48

developer   ~0030036

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).

vboctor

vboctor

2011-10-25 02:56

manager   ~0030045

If we are only doing this as part of the post install checks, then there is no issues.

dregad

dregad

2011-11-19 19:17

developer   ~0030253

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:

administrator: All Projects

------------ 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:

All Users: All Projects, Test Project
administrator: Test Project
user2: All Projects

------------ Test 5: option with multiple new recommendations, defined in DB
note: this case does not currently exist in obsolete.php
config_obsolete( 'dummy', array( 'dummy_new_1','dummy_new_2' ) );

Warning: The configuration option dummy is now obsolete

it is currently defined in the database configuration for:

All Users: All Projects

please see the following options:

dummy_new_1
dummy_new_2
dregad

dregad

2011-11-19 20:35

developer   ~0030254

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).

belfar

belfar

2011-11-23 18:39

reporter   ~0030290

teste

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036335

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master-1.2.x 5e9b8342

2011-10-20 07:16

dregad


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

dregad


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

dregad


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