mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-15 05:04:09 +02:00
Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11816
# By Joseph Warner (187) and others # Via Nathan Guse (6) and others * 'develop' of github.com:phpbb/phpbb3: (195 commits) [ticket/11828] Fix greedy operators in lexer [ticket/11835] Fix ucp_auth_link adding in migration [prep-release-3.0.12] Remove changelog entry for ticket that was not resolved. [ticket/develop/11832] Fix path detection [feature/oauth] Fix tabindex [ticket/9550] Add the core.viewtopic_post_rowset_data event to viewtopic.php [ticket/11829] Use report_closed to determine status in MCP report_details [feature/oauth] Fix bug on ucp_auth_link related to error display [feature/oauth] More small fixes [feature/oauth] More minor changes from review [feature/oauth] Fix small bug introduced by update in OAuth library [feature/oauth] Fix small issues on ucp pages [feature/oauth] Fix typo in OAuth logout method [feature/oauth] Make token storage service ignorant [feature/oauth] Update oauth::logout() to use clearAllTokens() [feature/oauth] Update storage implementation due to inteface change [feature/oauth] Update lusitanian/oauth to stable branch [ticket/11822] Use namespace lookup order for asset loading [feature/oauth] Update comment on oauth service exception [feature/oauth] Forgot to remove placeholder comment ... Conflicts: phpBB/phpbb/template/twig/lexer.php tests/template/template_test.php
This commit is contained in:
@@ -75,7 +75,7 @@ class phpbb_template_twig_lexer extends Twig_Lexer
|
||||
|
||||
// Fix tokens that may have inline variables (e.g. <!-- DEFINE $TEST = '{FOO}')
|
||||
$code = $this->fix_inline_variable_tokens(array(
|
||||
'DEFINE.+=',
|
||||
'DEFINE \$[a-zA-Z0-9]+ =',
|
||||
'INCLUDE',
|
||||
'INCLUDEPHP',
|
||||
'INCLUDEJS',
|
||||
@@ -240,7 +240,7 @@ class phpbb_template_twig_lexer extends Twig_Lexer
|
||||
return "<!-- {$matches[1]}IF{$inner}-->";
|
||||
};
|
||||
|
||||
return preg_replace_callback('#<!-- (ELSE)?IF((.*) \(?!?[\$|\.]([^\s]+)(.*))-->#', $callback, $code);
|
||||
return preg_replace_callback('#<!-- (ELSE)?IF((.*?) \(?!?[\$|\.]([^\s]+)(.*?))-->#', $callback, $code);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -264,10 +264,10 @@ class phpbb_template_twig_lexer extends Twig_Lexer
|
||||
*/
|
||||
|
||||
// Replace <!-- DEFINE $NAME with {% DEFINE definition.NAME
|
||||
$code = preg_replace('#<!-- DEFINE \$(.*)-->#', '{% DEFINE $1 %}', $code);
|
||||
$code = preg_replace('#<!-- DEFINE \$(.*?) -->#', '{% DEFINE $1 %}', $code);
|
||||
|
||||
// Changing UNDEFINE NAME to DEFINE NAME = null to save from creating an extra token parser/node
|
||||
$code = preg_replace('#<!-- UNDEFINE \$(.*)-->#', '{% DEFINE $1= null %}', $code);
|
||||
$code = preg_replace('#<!-- UNDEFINE \$(.*?)-->#', '{% DEFINE $1= null %}', $code);
|
||||
|
||||
// Replace all of our variables, {$VARNAME}, with Twig style, {{ definition.VARNAME }}
|
||||
$code = preg_replace('#{\$([a-zA-Z0-9_\.]+)}#', '{{ definition.$1 }}', $code);
|
||||
|
Reference in New Issue
Block a user