1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed thread_view content check

Discussion in 'Resolved Bug Reports' started by Lawrence, Jul 15, 2015.

  1. Lawrence

    Lawrence Well-Known Member

    In the thread view template, hasContent for the bottom pageNavLinkGroup will always be true. This is caused by this line:
    HTML:
    <div class="linkGroup"{xen:if '!{$ignoredNames}', ' style="display: none"'}><a href="javascript:" class="muted JsOnly DisplayIgnoredContent Tooltip" title="{xen:phrase show_hidden_content_by_x, "names={xen:helper implode, $ignoredNames, ', '}"}">{xen:phrase show_ignored_content}</a></div>
    If you replace the above line with the following code, the hasContent check has a chance to be false (and this does not affect anything if a user is ignoring a member):
    HTML:
    <xen:if is="{$ignoredNames}">
                    <div class="linkGroup"><a href="javascript:" class="muted JsOnly DisplayIgnoredContent Tooltip" title="{xen:phrase show_hidden_content_by_x, "names={xen:helper implode, $ignoredNames, ', '}"}">{xen:phrase show_ignored_content}</a></div>
    </xen:if>
    Only a small bug, but no reason to perform a content check when it will always resolve to be true, :)
     
  2. Mike

    Mike XenForo Developer Staff Member

    The approach used here is the standard approach for these ignore links, though I have to admit I don't really recall why. That said, there are a lot of other cases where this would be displayed even if this were changed, so removing the content check is probably the easiest.
     

Share This Page