MyBB 1.8
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
MyBB 1.8
MyBB 1.8 still uses this query in forumdisplay.php like MyBB 1.6?

PHP Code:
613
614
615
616
617
618
619
		$query = $db->simple_select("forums", "threads, unapprovedthreads, deletedthreads", "fid = '{$fid}'", array('limit' => 1));
		$forum_threads = $db->fetch_array($query);
		$threadcount = $forum_threads['threads'];
		if($ismod == true)
		{
			$threadcount += $forum_threads['unapprovedthreads'] + $forum_threads['deletedthreads'];
		}


10-05-2015 05:50 AM
Find all posts by this user Quote this message in a reply
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #2
RE: MyBB 1.8
Yes, I have this exact code in line 613 on Mybb 1.8.5

I'm afraid upgrade to 1.8.6, many users with problems, so stop suicide missions on MyBB for me lol
10-05-2015 09:33 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #3
RE: MyBB 1.8
I think MyBB should change the query since 1.8 has prefix filter feature in forumdisplay.

10-06-2015 03:16 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #4
RE: MyBB 1.8
1.6 https://github.com/mybb/mybb/blob/master...https://github.com/mybb/mybb/blob/master/forumdisplay.php

1.8 https://github.com/mybb/mybb/blob/featur...https://github.com/mybb/mybb/blob/feature/forumdisplay.php

You meant $prefixsql should be used in the query?

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
10-08-2015 06:00 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #5
RE: MyBB 1.8
Yep. I think it should uses the previous query (the query which count threads by using threads table) if $prefixsql has a value.

Also, you may interest to this lines in showthread.php

PHP Code:
369
370
371
372
373
374
375
376
	$query = $db->simple_select("forums", "threads, unapprovedthreads", "fid = '{$fid}'", array('limit' => 1));
	$forum_threads = $db->fetch_array($query);
	$threadcount = $forum_threads['threads'];

	if(is_moderator($fid, "canviewunapprove") == true)
	{
		$threadcount += $forum_threads['unapprovedthreads'];
	}


10-09-2015 03:33 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: