Closed #55
This commit is contained in:
parent
2f8d43cb4b
commit
558f8f42c8
1 changed files with 15 additions and 2 deletions
|
@ -826,11 +826,24 @@ class PostController
|
||||||
|
|
||||||
switch ($key)
|
switch ($key)
|
||||||
{
|
{
|
||||||
|
case 'id':
|
||||||
|
$ids = preg_split('/[;,]/', $val);
|
||||||
|
$ids = array_map('intval', $ids);
|
||||||
|
$dbQuery->$andFunc('id')->in('(' . R::genSlots($ids) . ')');
|
||||||
|
foreach ($ids as $id)
|
||||||
|
$dbQuery->put($id);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'idmin':
|
||||||
|
case 'idmax':
|
||||||
|
$operator = $key == 'idmin' ? '>=' : '<=';
|
||||||
|
$dbQuery->$andFunc('id ' . $operator . ' ?')->put(intval($val));
|
||||||
|
break;
|
||||||
|
|
||||||
case 'favmin':
|
case 'favmin':
|
||||||
case 'favmax':
|
case 'favmax':
|
||||||
$operator = $key == 'favmin' ? '>=' : '<=';
|
$operator = $key == 'favmin' ? '>=' : '<=';
|
||||||
$dbQuery
|
$dbQuery->$andFunc('fav_count ' . $operator . ' ?')->put(intval($val));
|
||||||
->$andFunc('fav_count ' . $operator . ' ?')->put(intval($val));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'type':
|
case 'type':
|
||||||
|
|
Loading…
Reference in a new issue