Skip to content

Commit

Permalink
Don't retrieve complex values for config report
Browse files Browse the repository at this point in the history
Since complex values are not displayed, don't return the content value
from database to save time and memory.

Fixes: #25910
  • Loading branch information
cproensa authored and dregad committed Jul 15, 2019
1 parent 8624cff commit 437305f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions adm_config_report.php
Expand Up @@ -202,7 +202,8 @@ function check_config_value( $p_config ) {
}

# Build config query
$t_sql = 'SELECT config_id, user_id, project_id, type, value, access_reqd'
$t_sql = 'SELECT config_id, user_id, project_id, type, access_reqd,'
. ' CASE type WHEN :complex THEN null ELSE value END AS value'
. ' FROM {config} WHERE 1=1';
if( $t_filter_user_value != META_FILTER_NONE ) {
$t_sql .= ' AND user_id = :user_id';
Expand All @@ -217,7 +218,8 @@ function check_config_value( $p_config ) {
$t_params = array(
'user_id' => $t_filter_user_value,
'project_id' => $t_filter_project_value,
'config_id' => $t_filter_config_value
'config_id' => $t_filter_config_value,
'complex' => CONFIG_TYPE_COMPLEX
);
$t_config_query = new DbQuery( $t_sql, $t_params );
?>
Expand Down

0 comments on commit 437305f

Please sign in to comment.