mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/11482] Use double quotes for code
Use double quotes for code to avoid excessive escaping PHPBB3-11482
This commit is contained in:
parent
5e8d92b0a8
commit
8567aaed32
1 changed files with 7 additions and 7 deletions
|
@ -840,10 +840,10 @@ class phpbb_template_filter extends php_user_filter
|
|||
if (!empty($match[2]) && !isset($match[3]) && $op)
|
||||
{
|
||||
// DEFINE tag with ENDDEFINE
|
||||
$array = '$_tpldata[\'DEFINE\'][\'.vars\']';
|
||||
$array = "\$_tpldata['DEFINE']['.vars']";
|
||||
$code = 'ob_start(); ';
|
||||
$code .= 'if (!isset(' . $array . ')) { ' . $array . ' = array(); } ';
|
||||
$code .= $array . '[] = \'' . $match[2] . '\'';
|
||||
$code .= "if (!isset($array)) { $array = array(); } ";
|
||||
$code .= "{$array}[] = '{$match[2]}'";
|
||||
return $code;
|
||||
}
|
||||
|
||||
|
@ -880,10 +880,10 @@ class phpbb_template_filter extends php_user_filter
|
|||
*/
|
||||
private function compile_tag_enddefine()
|
||||
{
|
||||
$array = '$_tpldata[\'DEFINE\'][\'.vars\']';
|
||||
$code = 'if (!isset(' . $array . ') || !sizeof(' . $array . ')) { trigger_error(\'ENDDEFINE tag without DEFINE in \' . basename(__FILE__), E_USER_ERROR); }';
|
||||
$code .= '$define_var = array_pop(' . $array . '); ';
|
||||
$code .= '$_tpldata[\'DEFINE\'][\'.\'][$define_var] = ob_get_clean();';
|
||||
$array = "\$_tpldata['DEFINE']['.vars']";
|
||||
$code = "if (!isset($array) || !sizeof($array)) { trigger_error('ENDDEFINE tag without DEFINE in ' . basename(__FILE__), E_USER_ERROR); }";
|
||||
$code .= "\$define_var = array_pop($array); ";
|
||||
$code .= "\$_tpldata['DEFINE']['.'][\$define_var] = ob_get_clean();";
|
||||
return $code;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue