Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] canviewthreads and private forums on forumlist [C-Michael83]
#1
If you have a forum set for "Can view forum?" to YES but "Can view threads within forum?" to NO you can still see the last post and thread title in the forum list. Below is the method to correct this. I would do it with a plugin but it's impossible and realistically I call this a bug. Of course double check my code but I believe it's just a simple check for the canviewthreads permission.


Inside inc/function_forumlist.php

Find this:
			// This forum has a password, and the user isn't authenticated with it - hide post information
			$hideinfo = false;
			if($forum['password'] != '' && $mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password']))
			{
				$hideinfo = true;
			}
Change to this:

			// This forum has a password, and the user isn't authenticated with it - hide post information
			$hideinfo = false;
			if($forum['password'] != '' && $mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password']) || $permissions['canviewthreads'] !=1)
			{
				$hideinfo = true;
			}

Thank you.
#2
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group
#3
Revision #4308

This does not make sense. The fix is working - you cannot see the last post info in the forumlist anymore. But you're still able to see the thread list if you enter the forum.

In addition to that the forum is marked as locked although it isn't.


Attached Files Thumbnail(s)
   
Greets,
Michael
-------------
[Image: donation_drive_sig.png]
#4
I didn't make any further changes beyond labrocca's suggested fix. Whatever is happening is a separate issue and you should write up a report for it separately


Forum Jump:


Users browsing this thread: 1 Guest(s)