Skip to content

[ticket/17621] Change U_WARN to use new warn_allowed variable#6941

Open
kaileymsnay wants to merge 5 commits intophpbb:3.3.xfrom
kaileymsnay:ticket/17621
Open

[ticket/17621] Change U_WARN to use new warn_allowed variable#6941
kaileymsnay wants to merge 5 commits intophpbb:3.3.xfrom
kaileymsnay:ticket/17621

Conversation

@kaileymsnay
Copy link
Contributor

@kaileymsnay kaileymsnay commented Mar 9, 2026

PHPBB-17621

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

New variable added to allow extensions to force the warn function.

PHPBB-17621
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

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.

* @var bool force_warn_allowed Allow the user to warn (all permissions and conditions are ignored)
* @since 3.1.0-b4
* @changed 3.1.11-RC1 Added force_softdelete_allowed var
* @changed 3.1.16-RC1 Added force_warn_allowed var
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.1.16-RC1? should be 3.3.16-RC1 same in your other PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, not sure why I did that. Fixed.

@kaileymsnay
Copy link
Contributor Author

Closing PR. This needs more testing to work the way as intended.

@kaileymsnay
Copy link
Contributor Author

Re-opening. Newest commit should fix issue.

@kaileymsnay kaileymsnay reopened this Mar 12, 2026
$permanent_delete_allowed = $force_delete_allowed || ($auth->acl_get('m_delete', $forum_id) ||
($auth->acl_get('f_delete', $forum_id) && $user->data['user_id'] == $poster_id));

$warn_allowed = $force_warn_allowed;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assignment looks redundant now, it seems that only 1 var is enough here.

Copy link
Contributor Author

@kaileymsnay kaileymsnay Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move it to the U_WARN line? Was trying to stay consistent with edit_allowed and delete_allowed.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants