mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
finish plugin: sticky promotion
This commit is contained in:
@@ -676,10 +676,11 @@ class SearchRepository extends BaseRepository
|
||||
foreach ($response['hits']['hits'] as $value) {
|
||||
$torrentIdArr[] = $value['_source']['torrent_id'];
|
||||
}
|
||||
$fieldStr = 'id, sp_state, promotion_time_type, promotion_until, banned, picktype, pos_state, category, source, medium, codec, standard, processing, team, audiocodec, leechers, seeders, name, small_descr, times_completed, size, added, comments,anonymous,owner,url,cache_stamp, pt_gen, hr';
|
||||
// $fieldStr = 'id, sp_state, promotion_time_type, promotion_until, banned, picktype, pos_state, category, source, medium, codec, standard, processing, team, audiocodec, leechers, seeders, name, small_descr, times_completed, size, added, comments,anonymous,owner,url,cache_stamp, pt_gen, hr';
|
||||
$fields = Torrent::getFieldsForList();
|
||||
$idStr = implode(',', $torrentIdArr);
|
||||
$result['data'] = Torrent::query()
|
||||
->selectRaw($fieldStr)
|
||||
->select($fields)
|
||||
->whereIn('id', $torrentIdArr)
|
||||
->orderByRaw("field(id,$idStr)")
|
||||
->get()
|
||||
|
||||
Reference in New Issue
Block a user