Jump to content

[BUG 4.7.14] Wrong topic class check on "IPS\forums\Topics" instead of "IPS\forums\Topic" (singular)


Go to solution Solved by teraßyte,

Recommended Posts

Posted (edited)

While reviewing some code in the forums application I found a couple of places that check the wrong class name for topics if the group is allowed to hide its own topics.

 

These are the 2 files where IPS\forums\Topics needs to be replaced with IPS\forums\Topic:

  1. Line 649 in \applications\forums\modules\front\forums\forums.php
    		$canHide = ( \IPS\Member::loggedIn()->group['g_hide_own_posts'] == '1' or \in_array( 'IPS\forums\Topics', explode( ',', \IPS\Member::loggedIn()->group['g_hide_own_posts'] ) ) );

     

  2. Line 530 in \applications\forums\sources\Topic\Topic.php
    		$canHide = ( $item ) ? $item->canHide() : ( \IPS\Member::loggedIn()->group['g_hide_own_posts'] == '1' or \in_array( 'IPS\forums\Topics', explode( ',', \IPS\Member::loggedIn()->group['g_hide_own_posts'] ) ) );

 

 

I searched all the files just in case, but those are the only ones I found.

Edited by teraßyte
Posted

Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.

 

  • 2 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...