Bug #662

member.php and $referrals

Added by Jesse Labrocca over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:01/08/2010
Priority:NormalDue date:
Assignee:Huji Lee% Done:

100%

Category:Member page
Target version:1.4.12
Reproducibility:Always Database Type:
Reported In MyBB Version:1.4.11 Database Version:
PHP Version: SQA assignments:
Browser:

Description

member.php
Code:
$query = $db->simple_select("users", "COUNT AS referrals", "referrer='{$memprofile['uid']}'");
$referrals = $db->fetch_field($query, "referrals");

I have never seen $referrals shown anywhere in profiles and the variable $referrals has no other references in the file.

It should be removed if it's not used. This query scans the entire users table and has the longest query time for that page on my site. It doesn't use a key/index either.

History

#1 Updated by Huji Lee over 4 years ago

  • Category set to Member page
  • Assignee set to Huji Lee
  • Target version set to 1.4.12

#2 Updated by Huji Lee over 4 years ago

  • Reported In MyBB Version changed from 1.4.12 to 1.4.11

#3 Updated by Huji Lee over 4 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4751.

#4 Updated by Stefan T. over 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF