Visitar URL original
Ticket/17750 Add core.messenger_template_paths event to 3.3 by bonelifer · Pull Request #7098 · phpbb/phpbb · GitHub
Skip to content

Ticket/17750 Add core.messenger_template_paths event to 3.3 - #7098

Open
bonelifer wants to merge 1 commit into
phpbb:3.3.xfrom
bonelifer:ticket/17750
Open

bonelifer wants to merge 1 commit into
phpbb:3.3.xfrom
bonelifer:ticket/17750

Conversation

@bonelifer

Copy link
Copy Markdown
Member

Checklist:

  • Correct branch: master for new features; 3.3.x for fixes
  • Tests pass
  • Code follows coding guidelines: master and 3.3.x
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB-17750

This is the 3.3.x version of #7054 (PHPBB-17722), which added core.messenger_template_paths to master for 4.0.0-b1. It adds the same event to messenger::template() in includes/functions_messenger.php, just before set_template_paths(), with the same variables (template_lang, template_dir_prefix, template_paths). A listening extension can add its own directory to template_paths and supply an override for a core notification email .txt template (for example post_in_queue.txt) without patching core.

tests/email/email_parsing_test.php now sets a mock $phpbb_dispatcher, because messenger::template() uses it now. This matches the dispatcher mock change in #7054's test.

Merging 3.3.x up into master will give a modify/delete conflict on includes/functions_messenger.php, because master removed that file when it moved the messenger to messenger\method\base. Keep master's deletion: master already has this event from #7054, so no separate master PR is needed.

Replaces #7097, which was opened under PHPBB-17722 before that ticket was found to be closed as fixed for 4.0.0-b1.


Investigated and written by Claude on behalf of William Jacoby (bonelifer).

Add a core.messenger_template_paths event to messenger::template(),
fired just before the email template search paths are passed to
set_template_paths(). A listener can add its own directory to
template_paths so an enabled extension can override a core
notification email .txt template without patching core.

This is the 3.3.x version of the event added to master in
PHPBB-17722.

PHPBB-17750
@github-actions

Copy link
Copy Markdown

The attempt to merge branch 3.3.x into master has completed after considering the changes in this PR.

  • Merge result: Conflict ❌

A separate PR will be needed to merge 3.3.x into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant