1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-25 12:33:29 +01:00

40 Commits

Author SHA1 Message Date
Andreas Fischer
d01c028c1c Merge remote-tracking branch 'cs278/ticket/10384' into develop
* cs278/ticket/10384:
  [ticket/10384] Language variable replacements should not check for var prefix.
  [ticket/10384] Update unit tests to test for failing variable.
2011-09-24 22:21:05 +02:00
Chris Smith
e9392bbdde [ticket/10384] Language variable replacements should not check for var prefix.
PHPBB3-10384
2011-09-24 20:50:35 +01:00
Chris Smith
95d24e6fb7 [ticket/10375] Rework $source_file setting.
Only set the file if an mtime check or recompile are required.

PHPBB3-10375
2011-09-21 13:24:04 +01:00
Chris Smith
9d5e9af54b [ticket/10375] Make _tpl_load() a little leaner.
- Removed duplicate variables
- Set $source_file earlier for cache checks
- Fixed useless mtime check

PHPBB3-10375
2011-09-21 13:17:51 +01:00
Chris Smith
25aee49ca5 [ticket/10375] Use existing method to generate cache file name.
PHPBB3-10375
2011-09-21 13:17:10 +01:00
Chris Smith
903bc5b78a [ticket/10374] Remove 'custom template' cache prefix.
PHPBB3-10374
2011-09-20 23:33:08 +01:00
Patrick Webster
b5a79009ce [ticket/10322] Separate template varref resolution from output generation
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
2011-09-16 01:46:42 -05:00
Patrick Webster
fbec7c9b2b [ticket/10322] Fix dynamic template includes
Dynamic template includes from variables was not implemented in the new
templating system.

PHPBB3-10322
2011-09-08 16:51:22 -05:00
Vjacheslav Trushkin
0cb539ed72 [ticket/10350] Fix for class phpbb_template_renderer_eval
Fixing bug in class phpbb_template_renderer_eval

PHPBB3-10350
2011-09-04 23:25:54 +03:00
Oleg Pudeyev
41de09e408 [feature/template-engine] Delete _get_locator function.
It is no longer needed as locator is injected into template.

PHPBB3-9726
2011-08-13 23:49:54 -04:00
Oleg Pudeyev
fb8a1d999f [feature/template-engine] Need to call set_template on template.
PHPBB3-9726
2011-08-09 23:33:47 -04:00
Oleg Pudeyev
acb767f14d [feature/template-engine] Dependency inject locator into template.
PHPBB3-9726
2011-08-09 23:28:40 -04:00
Oleg Pudeyev
66232035aa [feature/template-engine] Delete useless code from set_template.
set_custom_template performs these calls, repeating them in
set_template is not needed.

PHPBB3-9726
2011-08-09 23:20:54 -04:00
Oleg Pudeyev
df46a576e9 [feature/template-engine] Use template engine class in bbcode class.
PHPBB3-9726
2011-08-07 19:26:28 -04:00
Oleg Pudeyev
db257956aa [feature/template-engine] Corrected an error message in template locator.
PHPBB3-9726
2011-08-07 19:17:22 -04:00
Oleg Pudeyev
f3befa4b29 [feature/template-engine] Remaining documentation.
PHPBB3-9726
2011-08-07 19:07:27 -04:00
Oleg Pudeyev
02fc533066 [feature/template-engine] More documentation for template class.
PHPBB3-9726
2011-08-07 15:42:04 -04:00
Oleg Pudeyev
0b381516a0 [feature/template-engine] Create load_and_render to reduce code duplication.
PHPBB3-9726
2011-08-07 15:35:35 -04:00
Oleg Pudeyev
52f208900f [feature/template-engine] Get rid of orig_tpl_* in template engine.
The origins of orig_tpl_* are not pretty. Please see the following commits
and associated tickets: r9823, r9839, r9847, r10150, r10460.

In short, multiple hacks were required due to template engine reading
inheritance/storedb flags from $user (global) even when the template that
was being looked up or rendered was not the "active style of the
current user".

We no longer store templates in the database, removing half of the problem.
This commit fixes the second half of the problem by deleting
set_template_path function from template locator, and moving that logic
back into the template class' set_template. set_template now calls
set_custom_template, the latter only taking the template path and the
fallback paths as parameters. With this change template locator no longer
uses $user and does not use phpbb root path either.

All logic involving setting the user's "active" template is now
encapsulated in a single template class's function, set_template.
Setting other templates is done via set_custom_template and the caller
is responsible for determining and passing in fallback/inheritance path,
if any.

PHPBB3-9726
2011-08-04 21:45:42 -04:00
Oleg Pudeyev
1a6250d8b6 [feature/template-engine] Delete $style_name param from locator's set_custom_template.
This parameter was unused, it was only used by template's set_custom_template
to determine cache file prefix.

PHPBB3-9726
2011-08-04 21:24:40 -04:00
Oleg Pudeyev
13536f2be5 [feature/template-engine] Add constructor to template locator.
PHPBB3-9726
2011-08-04 21:23:06 -04:00
Oleg Pudeyev
05b71ca04e [feature/template-engine] Factor template locator out of template class.
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
2011-07-30 17:06:22 -04:00
Oleg Pudeyev
4126a571ac [feature/template-engine] Delete $files_template property.
This seems to have been used for db storage of templates.
We no longer offer db storage of templates, and thus currenty
$files_template is only written to but not read anywhere.

PHPBB3-9726
2011-07-30 15:20:25 -04:00
Oleg Pudeyev
e116561348 [feature/template-engine] Rename is_absolute to phpbb_is_absolute.
PHPBB3-9726
2011-07-24 13:37:46 -04:00
Igor Wiedler
bf34264f4f [feature/template-engine] Docblocks, no more constructor for filter
Add docblocks for phpbb_template_filter, remove the useless constructor.

PHPBB3-9726
2011-07-16 15:24:14 +02:00
Oleg Pudeyev
e43d8732d4 [feature/template-engine] Add ampersands to return refs by reference.
PHPBB3-9726
2011-07-10 03:45:57 -04:00
Oleg Pudeyev
66cef00589 [feature/template-engine] Delete useless assignment by reference for $lang.
PHPBB3-9726
2011-07-10 03:41:09 -04:00
Igor Wiedler
c58b09e65d [feature/template-engine] Remove $include_once argument of display()
PHPBB3-9726
2011-07-10 01:05:54 +02:00
Igor Wiedler
ae53623230 [feature/template-engine] Refactor $config dependency out of the filter
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
2011-07-10 00:35:07 +02:00
Igor Wiedler
ee0bba3ab6 [feature/template-engine] Fix some comments
PHPBB3-9726
2011-07-10 00:33:25 +02:00
Igor Wiedler
f7b06ca12d [feature/template-engine] Move template.php to includes/template
This allows making use of autoloading.

PHPBB3-9726
2011-07-10 00:30:50 +02:00
Oleg Pudeyev
7d911e0bc1 [feature/template-engine] Delete @version everywhere.
This is not used since the switch to git.

PHPBB3-9726
2011-05-14 15:30:20 -04:00
Oleg Pudeyev
70ccf04e06 [feature/template-engine] Moved phpbb_template_filter into own file.
PHPBB3-9726
2011-05-14 15:30:20 -04:00
Oleg Pudeyev
b04f0a5f70 [feature/template-engine] Delete @access everywhere.
Access specification in php 5 is done directly on functions/properties.

PHPBB3-9726
2011-05-14 15:30:20 -04:00
Oleg Pudeyev
94560d7086 [feature/template-engine] Make INCLUDEPHP relative to board root.
PHPBB3-9726
2011-05-12 20:13:32 -04:00
Oleg Pudeyev
d6f75e97d6 [feature/template-engine] Added docblocks to get_*_ref in context.
PHPBB3-9726
2011-05-12 20:13:31 -04:00
Oleg Pudeyev
635460fa6d [feature/template-engine] Fixed reference usage.
Hopefully this is right, I have not checked it against the manual
(assuming the manual even covers these things).

PHPBB3-9726
2011-05-12 20:13:31 -04:00
Oleg Pudeyev
169c4377e9 [feature/template-engine] Disposed of underscores in property names.
PHPBB3-9726
2011-05-12 20:13:31 -04:00
Oleg Pudeyev
0462ab3a4a [feature/template-engine] Add back IN_PHPBB preamble.
PHPBB3-9726
2011-05-12 20:13:30 -04:00
Oleg Pudeyev
49cf28a9c4 [feature/template-engine] Moved template classes to subdirectory.
PHPBB3-9726
2011-05-08 04:06:25 -04:00