| @@ 263-274 (lines=12) @@ | ||
| 260 | 'list_uid' => 0 |
|
| 261 | ))); |
|
| 262 | $criteria = new CriteriaCompo(); |
|
| 263 | switch ($parameters['listType']) { |
|
| 264 | case OLEDRION_LISTS_ALL: |
|
| 265 | $criteria->add(new Criteria('list_id', 0, '<>')); |
|
| 266 | break; |
|
| 267 | case OLEDRION_LISTS_ALL_PUBLIC: |
|
| 268 | $criteria->add(new Criteria('list_type', OLEDRION_LISTS_WISH, '=')); |
|
| 269 | $criteria->add(new Criteria('list_type', OLEDRION_LISTS_RECOMMEND, '='), 'OR'); |
|
| 270 | break; |
|
| 271 | default: |
|
| 272 | $criteria->add(new Criteria('list_type', $parameters['listType'], '=')); |
|
| 273 | break; |
|
| 274 | } |
|
| 275 | if ($parameters['list_uid'] > 0) { |
|
| 276 | $criteria->add(new Criteria('list_uid', $parameters['list_uid'], '=')); |
|
| 277 | } |
|
| @@ 296-307 (lines=12) @@ | ||
| 293 | public function getRecentListsCount($listType = OLEDRION_LISTS_ALL, $list_uid = 0) |
|
| 294 | { |
|
| 295 | $criteria = new CriteriaCompo(); |
|
| 296 | switch ($listType) { |
|
| 297 | case OLEDRION_LISTS_ALL: |
|
| 298 | $criteria->add(new Criteria('list_id', 0, '<>')); |
|
| 299 | break; |
|
| 300 | case OLEDRION_LISTS_ALL_PUBLIC: |
|
| 301 | $criteria->add(new Criteria('list_type', OLEDRION_LISTS_WISH, '=')); |
|
| 302 | $criteria->add(new Criteria('list_type', OLEDRION_LISTS_RECOMMEND, '='), 'OR'); |
|
| 303 | break; |
|
| 304 | default: |
|
| 305 | $criteria->add(new Criteria('list_type', $listType, '=')); |
|
| 306 | break; |
|
| 307 | } |
|
| 308 | if ($list_uid > 0) { |
|
| 309 | $criteria->add(new Criteria('list_uid', $list_uid, '=')); |
|
| 310 | } |
|