Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9506

Most Active Topic can be unapproved

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.0.7-PL1
    • None
    • Irrelevant

      If a user's "most active topic" is on the moderation queue, it still shows up, even if the user viewing the profile is not permitted to see topics on the queue.

      	// Obtain active topic
      	$sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
      		FROM ' . POSTS_TABLE . '
      		WHERE poster_id = ' . $userdata['user_id'] . "
      			AND post_postcount = 1
      			$forum_sql
      		GROUP BY topic_id
      		ORDER BY num_posts DESC";
      

      The query ignores the post_approved column entirely.

      tbh, I'm not sure that I would fix this. I'd have to look at the query optimizer output, these activity queries are nasty enough.

            Unassigned Unassigned
            A_Jelly_Doughnut A_Jelly_Doughnut
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: