Fixed Template macro thread_list_macros::item, canEdit called even with allowEdit is false

Xon

Well-known member
Affected version
2.1.1
This macro has an "allowEdit" argument, however; if this is false $thread.canEdit() is still called before testing it. This prevents short-circuit evaluation from skipping canEdit and canUseInlineModeration checks.

Ref;
Code:
<xf:elseif is="$thread.canEdit() AND $thread.canUseInlineModeration() AND {$allowEdit}" />
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.2).

Change log:
Allow short circuiting of canEdit checks in the thread list macros item template.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top Bottom