aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2014-06-16 01:37:21 +0200
committerAndreas Fischer <bantu@phpbb.com>2014-06-16 01:37:21 +0200
commit663c375f5c1547e80f79aae0775eed0039956699 (patch)
tree804b9afc203c9e06e34a81879a62ec639c16d8d1 /phpBB
parentf27be59cf1bc97ac9da6bc7f963b1e0c44ee248b (diff)
parent5a320adc75faffe27d9d0b822e30106f1d27f2c2 (diff)
downloadforums-663c375f5c1547e80f79aae0775eed0039956699.tar
forums-663c375f5c1547e80f79aae0775eed0039956699.tar.gz
forums-663c375f5c1547e80f79aae0775eed0039956699.tar.bz2
forums-663c375f5c1547e80f79aae0775eed0039956699.tar.xz
forums-663c375f5c1547e80f79aae0775eed0039956699.zip
Merge pull request #2605 from Nicofuma/ticket/12724
[ticket/12724] Add Squiz.PHP.Eval in the legacy ruleset * Nicofuma/ticket/12724: [ticket/12724] Add Squiz.PHP.Eval in the legacy ruleset
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_convert.php2
-rw-r--r--phpBB/includes/functions_module.php2
-rw-r--r--phpBB/install/index.php4
-rw-r--r--phpBB/install/install_convert.php14
4 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index e68e770b3a..186e3b50f0 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1287,7 +1287,9 @@ function restore_config($schema)
{
$var = (empty($m[2]) || empty($convert_config[$m[2]])) ? "''" : "'" . addslashes($convert_config[$m[2]]) . "'";
$exec = '$config_value = ' . $m[1] . '(' . $var . ');';
+ // @codingStandardsIgnoreStart
eval($exec);
+ // @codingStandardsIgnoreEnd
}
else
{
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index 51284af233..b7615e923b 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -456,7 +456,9 @@ class p_master
);
$is_auth = false;
+ // @codingStandardsIgnoreStart
eval('$is_auth = (int) (' . $module_auth . ');');
+ // @codingStandardsIgnoreEnd
return $is_auth;
}
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 43970029cb..bff7b75b18 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -752,12 +752,16 @@ class module
break;
case 'select':
+ // @codingStandardsIgnoreStart
eval('$s_options = ' . str_replace('{VALUE}', $value, $options) . ';');
+ // @codingStandardsIgnoreEnd
$tpl = '<select id="' . $name . '" name="' . $name . '">' . $s_options . '</select>';
break;
case 'custom':
+ // @codingStandardsIgnoreStart
eval('$tpl = ' . str_replace('{VALUE}', $value, $options) . ';');
+ // @codingStandardsIgnoreEnd
break;
default:
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index 674a1f7dd3..4d6aff154c 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -1021,7 +1021,9 @@ class install_convert extends module
// Now process queries and execute functions that have to be executed prior to the conversion
if (!empty($convert->convertor['execute_first']))
{
+ // @codingStandardsIgnoreStart
eval($convert->convertor['execute_first']);
+ // @codingStandardsIgnoreEnd
}
if (!empty($convert->convertor['query_first']))
@@ -1091,7 +1093,9 @@ class install_convert extends module
// process execute_first and query_first for this table...
if (!empty($schema['execute_first']))
{
+ // @codingStandardsIgnoreStart
eval($schema['execute_first']);
+ // @codingStandardsIgnoreEnd
}
if (!empty($schema['query_first']))
@@ -1156,7 +1160,9 @@ class install_convert extends module
// it gets split because of time restrictions
if (!empty($schema['execute_always']))
{
+ // @codingStandardsIgnoreStart
eval($schema['execute_always']);
+ // @codingStandardsIgnoreEnd
}
//
@@ -1667,13 +1673,17 @@ class install_convert extends module
{
if (!is_array($convert->convertor['execute_last']))
{
+ // @codingStandardsIgnoreStart
eval($convert->convertor['execute_last']);
+ // @codingStandardsIgnoreEnd
}
else
{
while ($last_statement < sizeof($convert->convertor['execute_last']))
{
+ // @codingStandardsIgnoreStart
eval($convert->convertor['execute_last'][$last_statement]);
+ // @codingStandardsIgnoreEnd
$template->assign_block_vars('checks', array(
'TITLE' => $convert->convertor['execute_last'][$last_statement],
@@ -2035,7 +2045,9 @@ class install_convert extends module
$execution = str_replace('{RESULT}', '$value', $execution);
$execution = str_replace('{VALUE}', '$value', $execution);
+ // @codingStandardsIgnoreStart
eval($execution);
+ // @codingStandardsIgnoreEnd
}
}
}
@@ -2082,7 +2094,9 @@ class install_convert extends module
$execution = str_replace('{RESULT}', '$value', $execution);
$execution = str_replace('{VALUE}', '$value', $execution);
+ // @codingStandardsIgnoreStart
eval($execution);
+ // @codingStandardsIgnoreEnd
}
}
}