Bug #460
Attachment search not working correctly
| Status: | Closed | Start date: | 09/10/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Tom Moore | % Done: | 100% |
|
| Category: | Admin Control Panel | |||
| Target version: | 1.4.10 | |||
| Reproducibility: | Always | Database Type: | ||
| Reported In MyBB Version: | 1.4.8 | Database Version: | ||
| PHP Version: | SQA assignments: | |||
| Browser: |
Description
The attachment search in the ACP is not working correctly.
1. The condition dateuploaded is not working as expected.
2. If you use at least one of the conditions dateuploaded, downloads and/or downloads and you click on one of the pagination links you get wrong results or an error saying that nothing was found.
Possible fix: Open admin/modules/forum/attachments.php and find:
if($mybb->input['dateuploaded'])
{
$mybb->input['dateuploaded'] = TIME_NOW-60*60*24;
}
if($mybb->input['filesize'])
{
$mybb->input['filesize'] *= 1024;
}
Replace with:
if($mybb->input['dateuploaded'] && $mybb->request_method == "post")
{
$mybb->input['dateuploaded'] = TIME_NOW-$mybb->input['dateuploaded']*60*60*24;
}
if($mybb->input['filesize'] && $mybb->request_method == "post")
{
$mybb->input['filesize'] *= 1024;
}
Find:
$more_options = array(
"greater_than" => $lang->more_than,
"less_than" => $lang->less_than
);
Replace with:
$more_options = array(
"less_than" => $lang->more_than,
"greaterless_than" => $lang->less_than
);
Associated revisions
Fixes Attachment search not working correctly (fixes:460)
Fixes Attachment search not working correctly (fixes:460)
History
Updated by Stefan T. over 2 years ago
- Status changed from New to Confirmed
Updated by Tom Moore over 2 years ago
- Status changed from Confirmed to Resolved
- % Done changed from 0 to 100
Applied in changeset r4469.
Updated by Tom Moore over 2 years ago
- Assignee set to Tom Moore
- Target version set to 1.4.10
Updated by Michael Schlechtinger over 2 years ago
Sorry for this issue.
"greaterless_than" => $lang->less_than
should be
"greater_than" => $lang->less_than
Updated by Tom Moore over 2 years ago
Applied in changeset r4481.
Sorry, my fault for not checking!
I'll trust you with this one too... ;o)
Updated by Michael Schlechtinger over 2 years ago
- Status changed from Resolved to Closed