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

124 Commits

Author SHA1 Message Date
David King
a9db155c28 Merge remote-tracking branch 'p/feature/template-events' into develop
# By Oleg Pudeyev (36) and others
# Via Oleg Pudeyev
* p/feature/template-events: (47 commits)
  [feature/template-events] Pass arguments in correct order.
  [feature/template-events] Order extensions in mock extension manager.
  [feature/template-events] Changes per imkingdavid's review.
  [feature/template-events] Make style names private on template.
  [feature/template-events] Test for event that is defined in parent style only.
  [feature/template-events] Specify style names, add inheritance tests.
  [feature/template-events] Normalize expected directory trees.
  [feature/template-events] Allow dataset to be correctly selectable.
  [feature/template-events] Dataset for template event testing with inheritance.
  [feature/template-events] Use style names array in template filter.
  [feature/template-events] Generate style names array in set_style.
  [feature/template-events] Convert a single style name to array of them.
  [feature/template-events] Chase dependency injection for template context.
  [feature/template-events] Adjust template events test to use the dataset.
  [feature/template-events] Create a dataset for template event tests.
  [feature/template-events] Indentation fix.
  [feature/template-events] Cosmetic changes.
  [feature/template-events] Wording: wrongly -> improperly.
  [feature/template-events] Indentation fix.
  [feature/template-events] Rename template_name to style_name.
  ...
2012-12-10 14:09:10 -05:00
Oleg Pudeyev
318140b4d6 [ticket/10103] Convert the rest of the tree to flock class.
PHPBB3-10103
2012-12-04 02:26:55 -05:00
Oleg Pudeyev
ec4343c744 [ticket/11227] @return void -> @return null, per coding guidelines.
PHPBB3-11227
2012-11-30 23:03:06 -05:00
Oleg Pudeyev
47a90f815d [feature/template-events] Changes per imkingdavid's review.
PHPBB3-9550
2012-11-17 16:43:40 -05:00
Oleg Pudeyev
da7d888448 [feature/template-events] Make style names private on template.
PHPBB3-9550
2012-11-17 16:43:38 -05:00
Oleg Pudeyev
af47779f51 [feature/template-events] Use style names array in template filter.
This provides a straightforward way of iterating over all styles
looking for templates in extensions.

PHPBB3-9550
2012-11-17 16:42:43 -05:00
Oleg Pudeyev
44d6dc4c4c [feature/template-events] Convert a single style name to array of them.
This allows template code to know the entire style hierarchy for
templates being rendered.

PHPBB3-9550
2012-11-17 16:42:40 -05:00
Nathan Guse
0141154ceb [feature/template-events] Indentation fix.
PHPBB3-9550
2012-11-17 16:40:00 -05:00
Oleg Pudeyev
6c7f1f7bde [feature/template-events] Cosmetic changes.
PHPBB3-9550
2012-11-17 16:40:00 -05:00
Nathan Guse
4ed9e4124e [feature/template-events] Wording: wrongly -> improperly.
PHPBB3-9550
2012-11-17 16:40:00 -05:00
Nathan Guse
2fb4006056 [feature/template-events] Indentation fix.
PHPBB3-9550
2012-11-17 16:40:00 -05:00
Oleg Pudeyev
9c31a0ffc7 [feature/template-events] Rename template_name to style_name.
"Style name" makes a lot more sense and should be in line with
recent style/template changes.

PHPBB3-9550
2012-11-17 16:39:59 -05:00
Oleg Pudeyev
09b4cf2f4c [feature/template-events] Report when templates cannot be compiled.
PHPBB3-9550
2012-11-17 16:39:59 -05:00
Oleg Pudeyev
4b28b413f2 [feature/template-events] Update EVENT tag documentation.
It should now fairly closely reflect what actually happens.

PHPBB3-9550
2012-11-17 16:39:59 -05:00
Oleg Pudeyev
faf96a1b40 [feature/template-events] Delete old comments/test code.
PHPBB3-9550
2012-11-17 16:39:59 -05:00
Oleg Pudeyev
bd63b17d00 [feature/template-events] Move comment to the function docblock.
PHPBB3-9550
2012-11-17 16:39:59 -05:00
Oleg Pudeyev
1b36fc3a60 [feature/template-events] Handle user access correctly.
Pass through $user from template to filter.

Allow $user to be null for standalone usage of the template engine.

PHPBB3-9550
2012-11-17 16:39:59 -05:00
Oleg Pudeyev
45a1219886 [feature/template-events] Always commit suicide for invalid event names.
Note: suicide happens for syntactically invalid event names,
e.g. event names containing punctuation.

Event names for which there are no events are silently dropped.

PHPBB3-9550
2012-11-17 16:39:58 -05:00
Oleg Pudeyev
f46f48a2cf [feature/template-events] Chase template/style renames and changes.
PHPBB3-9550
2012-11-17 16:39:58 -05:00
Erik Frèrejean
7bd5f7641f [feature/template-events] Fix typo (waring -> warning)
PHPBB3-9550
2012-11-17 16:39:58 -05:00
Erik Frèrejean
2add66c0eb [feature/template-events] Add additional space for editors
Use `' ?'. '>'` rather than `' ?>'` as the latter causes problems
in some editors.

PHPBB3-9550
2012-11-17 16:39:58 -05:00
Erik Frèrejean
6fc0c889fd [feature/template-events] Remove comment
Remove comment per Nils in the PR.

PHPBB3-9550
2012-11-17 16:39:58 -05:00
Erik Frèrejean
132bbede2b [feature/template-events] Handle incorrect template event identifiers
If the template event identifier is wrongly formatted phpBB will
triggern an `E_USER_NOTICE` if the `DEBUG` constant is set, otherwise
the location is ignored.

PHPBB3-9550
2012-11-17 16:39:58 -05:00
Erik Frèrejean
f836277638 [feature/template-events] RUNHOOKS -> EVENT
PHPBB3-9550
2012-11-17 16:39:58 -05:00
Nathan Guse
04f55ba306 [feature/template-events] Correct indentation
PHPBB3-9550
2012-11-17 16:39:57 -05:00
Michael Cullum
8d58e69ed3 [feature/template-events] Rename RUNHOOKS to EVENT
Rename the way to add template events

PHPBB3-9550
2012-11-17 16:39:57 -05:00
Oleg Pudeyev
ecdb54fc04 [feature/template-events] PHP does not parse <?php?>, avoid generating it.
PHPBB3-9550
2012-11-17 16:39:57 -05:00
Oleg Pudeyev
bdbb382a26 [feature/template-events] Invoke template hooks that are template-specific.
PHPBB3-9550
2012-11-17 16:39:57 -05:00
Oleg Pudeyev
a6c7fbc59d [feature/template-events] Pass top-level template name to template filter.
This will be used to invoke template-specific hooks.

PHPBB3-9550
2012-11-17 16:39:57 -05:00
Oleg Pudeyev
dd7c5183fb [feature/template-events] Add template_compile to template filter params.
PHPBB3-9550
2012-11-17 16:39:57 -05:00
Oleg Pudeyev
ea094dd91a [feature/template-events] Rename universal to all (for template fragments).
PHPBB3-9550
2012-11-17 16:39:57 -05:00
Oleg Pudeyev
b6f6add9d4 [feature/template-events] Fix property name for extension manager.
PHPBB3-9550
2012-11-17 16:39:57 -05:00
Oleg Pudeyev
66232031e4 [feature/template-events] Really basic template hook implementation.
PHPBB3-9550
2012-11-17 16:39:56 -05:00
Oleg Pudeyev
09aae1ea30 [feature/template-events] Inject template compile into template filter.
This is needed for hooks in order for the filter to compile
template files from extensions.

PHPBB3-9550
2012-11-17 16:39:56 -05:00
Oleg Pudeyev
d6c881d0c6 [feature/template-events] Inject extension manager into template class.
Template class passes extension manager to template compiler.

Template compiler passes extension manager to template filter.

Template filter will use extension manager to locate hooks
as it is compiling templates.

All extension manager arguments are optional. If an extension
manager is not given, template hooks will not be invoked.

PHPBB3-9550
2012-11-17 16:39:54 -05:00
Oleg Pudeyev
ed548ae8ff [feature/template-events] Outline for RUNHOOKS template tag.
Ported to the new develop, hopefully this is still sensible.

PHPBB3-9550
2012-11-17 16:38:25 -05:00
Igor Wiedler
b5e069f879 Merge remote-tracking branch 'p/ticket/10933' into develop
* p/ticket/10933:
  [ticket/10933] Prose for get_first_file_location.
  [ticket/10933] Remaining documentation for added functions in resource locator
  [ticket/10933] Update template locator test to use style resource locator.
  [ticket/10933] Dispose of locate function in template class.
  [ticket/10933] Add mutators for template_path to style resource locator.
  [ticket/10933] Delete template_path assignment.
  [ticket/10933] Delete template_path from template class.
  [ticket/10933] Add get_first_template_location.
2012-11-17 19:49:03 +01:00
Andreas Fischer
847feb07e7 Merge remote-tracking branch 'EXreaction/ticket/11189' into develop
* EXreaction/ticket/11189:
  [ticket/11189] Replace DEBUG_EXTRA with DEBUG
  [ticket/11189] Always log critical errors when in cron or in image output
2012-11-10 23:39:00 +01:00
Nathaniel Guse
bd37f7f6c0 [ticket/11189] Replace DEBUG_EXTRA with DEBUG
PHPBB3-11189
2012-11-10 10:45:02 -06:00
Nils Adermann
f0cfae1f01 Merge pull request #881 from Fyorl/ticket/10970
Allow INCLUDE template macros to accept paths of the form {FOO}/a/{BAR}/c
2012-11-10 07:46:50 -08:00
Fyorl
a05f354fdf [ticket/10970] Added extra documentation to parse_dynamic_path.
PHPBB3-10970
2012-11-10 09:36:02 +00:00
Oleg Pudeyev
7fdab9c5d7 [ticket/10933] Prose for get_first_file_location.
Also rewrite get_first_template_location prose a little to be
less repetitive with get_first_file_location.

PHPBB3-10933
2012-11-02 19:45:02 -04:00
Oleg Pudeyev
0dd981071b [ticket/10933] Dispose of locate function in template class.
It had no callers other than the test suite.

PHPBB3-10933
2012-11-02 19:39:07 -04:00
Oleg Pudeyev
97e53103c3 [ticket/10933] Delete template_path from template class.
template_path is now only present in style resource locator.

PHPBB3-10933
2012-11-02 19:37:52 -04:00
Oleg Pudeyev
615d5ef628 [ticket/10933] Add get_first_template_location.
This localizes template_path to style resource locator.

locate function on template will be removed in a subsequent commit.

PHPBB3-10933
2012-11-02 19:37:52 -04:00
Oleg Pudeyev
767d09227b [ticket/10933] Dependency inject template context.
PHPBB3-10933
2012-11-02 18:51:35 -04:00
Oleg Pudeyev
766353fe5c [ticket/10933] Useful documentation for template locate function
PHPBB3-10933
2012-11-02 18:03:52 -04:00
Oleg Pudeyev
0c18f92c0a [ticket/10933] Typo fixes
PHPBB3-10933
2012-11-02 18:03:52 -04:00
Oleg Pudeyev
8528d8ff34 [ticket/10933] Initialize template context when template is constructed.
There is no apparent reason for either initializing or clearing
the context in set_style/set_custom_style.

Initially the initialization there was added in
0501640d5db158a010741e27803191ab469834c4, for reasons that
presently I do not see.

This permits making context property back private.

PHPBB3-10933
2012-11-02 18:03:52 -04:00
David King
8a91598b14 Merge remote-tracking branch 'nickvergessen/ticket/10876' into develop 2012-09-08 15:58:25 -04:00