Changing template classes prefixes from phpbb_template to phpbb_style (for classes that will work with styles) or phpbb_style_template (for classes that are specific to templates)
PHPBB3-10632
This commit adds a template path provider to separate the process of locating
(cached) paths in extensions from the template engine. The locator is supplied
with a list of paths from the path provider.
Admin templates can now be created in ext/<ext>/adm/style/ and regular
templates go into ext/<ext>/styles/<style>/template/. Extension templates
override regular templates. So if an extension supplies a file with a name
used in phpBB, the extension's file will be used.
A side-effect of this commit: Locator and Provider are now able to deal with
arbitrary levels of template inheritance. So we can expose this through
phpbb_template if we choose to, and allow styles to inherit from inherited
styles.
PHPBB3-10323
* 'develop' of git://github.com/phpbb/phpbb3:
[ticket/10392] Alter parent namespace stripping.
[ticket/10392] Test for magic loop variables with nested namespaces.
[ticket/10392] Missed fix for S_BLOCK_NAME.
[ticket/10392] Fix access to nested special block variables.
Most template variables can now have their PHP variable name resolved instead
of only compiling directly. This allows for the use of block vars in INCLUDE
statements. This does not work for language variables since they require
multiple checks. Added tests for the new types of allowed INCLUDEs.
PHPBB3-10322
When template tests are skipped because cache directory is not
writable, include path to the cache directory into the message
saying it is not writable.
PHPBB3-10354
Template locator is responsible for maintaining mapping from template
handles to filenames and paths, and provides resolution services
using these mappings.
Template locator is aware of template inheritance and is capable of
checking template file existence on the filesystem.
PHPBB3-9726
The template stream filter no longer depends on the $config global.
Instead it uses a 'allow_php' param that is passed via
stream_bucket_append's last argument.
Tests also adjusted.
PHPBB3-9726
When testing eval code path, compiled templates may not be written
to the file system, and unconditionally trying to copy them
breaks tests.
PHPBB3-9726
compile_tag_if had the flawed approach of adding an isset statement for
all variables to the beginning of the if. This fails for negative
expressions, and checking those takes a considerable effort.
The easier solution is to make the variable expression itself
conditional, defaulting to null if it is not set.
Thanks to naderman for the solution.
PHPBB3-9726