Bug #356

Search finduserthreads problem with limit

Added by Ryan Gordon 8 months ago. Updated 6 months ago.

Status:Closed Start:08/08/2009
Priority:Normal Due date:
Assigned to:Ryan Gordon % Done:

100%

Category:Search
Target version:1.4.10
Reproducibility: Browser:
Reported In MyBB Version:1.4.8 Database Type:
PHP Version: Database Version:

Description

From profile there are 2 options.
1. Find All Threads
2. Find All Posts

If you have limit set for search results.

If you Find All Posts the results display the newest posts first.

BUG: If you Find All Threads the results display the oldest threads first and cut off the new threads because of order.

If no limit is set then the search results do indeed display newest threads first. So this is related to limit.

You can see example from HF on my own profile.

Possible fix:

search.php

@if(intval($mybb->settings['searchhardlimit']) > 0) {
$limitsql = "LIMIT ".intval($mybb->settings['searchhardlimit']);
}@

Change to:

@if(intval($mybb->settings['searchhardlimit']) > 0) {
$limitsql = "ORDER BY t.dateline DESC LIMIT ".intval($mybb->settings['searchhardlimit']);
}@

Associated revisions

Revision 4419
Added by Ryan Gordon 8 months ago

Fixes Search finduserthreads problem with limit (fixes:356)
Fixes member.php custom profile fields alternating trow issue (fixes:355)

History

Updated by Ryan Gordon 8 months ago

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

Applied in changeset r4419.

Updated by Stefan T. 7 months ago

  • Status changed from Resolved to Closed

Updated by Ryan Gordon 6 months ago

  • Target version changed from 1.4.9 to 1.4.10
  • Reported In MyBB Version set to 1.4.8

Also available in: Atom PDF