Skip to content

Ticket/17725 Add core.mcp_warn_user_modify_template_vars + mcp_warn_user_rank_after - #7057

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

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

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-17725

Adds a new PHP event core.mcp_warn_user_modify_template_vars in mcp_warn_user_view(), right before the page's assign_vars() call (exposing user_row, user_rank_data, avatar_img), plus a new template event mcp_warn_user_rank_after right after the rank output in mcp_warn_user.html. Neither hook currently exists on a normal page load — the only existing trigger_event() calls in this function fire solely inside the actual warning-submission branch. See the linked ticket for the full use case.

@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.

mcp_warn.php only fires trigger_event() calls inside the branch that
handles an actual warning submission. On a normal page load, a
moderator opening the warn-user page, neither event fires, so there is
no hook between fetching user_row and the final assign_vars() call,
and the template has no event tag anywhere near the user summary block
either.

Adds a PHP event before the assign_vars() call exposing user_row,
user_rank_data and avatar_img, plus a template event right after the
rank output, matching the position of the equivalent event already
proposed for mcp_warn_post.html.

PHPBB-17725
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