Added favmax: (consistency with datemax:)

This commit is contained in:
Marcin Kurczewski 2013-10-16 13:01:33 +02:00
parent 28c1ce68b4
commit 9e73d0de91

View file

@ -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':