Fixed SearchController::convertShortSearchNames does not function as expected

Xon

Well-known member
Affected version
2.3.0
There is dead code in convertShortSearchNames, and the o arguments it not copied into the order search argument. This results in the order clause not being preserved when a search is re-triggered.

PHP:
    protected function convertShortSearchNames(array $input)
    {
        $output = [];

...

        if (isset($input['o']))
        {
                $output['o'] = $input['o'] ?: null;
        }

        return $output;

        return [
            'search_type' => $input['t'] ?: null,
            'keywords' => $input['q'],
            'c' => $input['c'],
            'grouped' => $input['g'] ? 1 : 0,
            'order' => $input['o'] ?: null,
        ];
    }
 
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.1).

Change log:
Fix behavior of search short-name conversion
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom