Added favmax: (consistency with datemax:)
This commit is contained in:
parent
28c1ce68b4
commit
9e73d0de91
1 changed files with 3 additions and 1 deletions
|
@ -633,13 +633,15 @@ class PostController
|
|||
switch ($key)
|
||||
{
|
||||
case 'favmin':
|
||||
case 'favmax':
|
||||
$operator = $key == 'favmin' ? '>=' : '<=';
|
||||
$dbQuery
|
||||
->open()
|
||||
->select('COUNT(1)')
|
||||
->from('favoritee')
|
||||
->where('post_id = post.id')
|
||||
->close()
|
||||
->addSql('>= ?')->put(intval($val));
|
||||
->addSql($operator . ' ?')->put(intval($val));
|
||||
break;
|
||||
|
||||
case 'type':
|
||||
|
|
Loading…
Reference in a new issue