unset($params[':date']); } // Filter by category if (ae_Permalink::isCategory()) { $ca = ae_Permalink::getCategoryModel(); if ($ca !== FALSE) { $filter['WHERE'] .= ' AND po_id IN ( SELECT DISTINCT pc_post FROM `' . AE_TABLE_POSTS2CATEGORIES . '` WHERE pc_category = :catId ) '; $params[':catId'] = $ca->getId(); } } else { if (ae_Permalink::isTag()) { $tag = ae_Permalink::getTagName(); $tag = '%' . $tag . '%'; $filter['WHERE'] .= ' AND po_tags LIKE :tag'; $params[':tag'] = $tag; } else { if (ae_Permalink::isUser()) { if (($userId = ae_Permalink::getUserId()) !== FALSE) { $filter['WHERE'] .= ' AND po_user = :user'; $params[':user'] = $userId; } } } } $postList = new ae_PostList($filter, $params); $postList->loadCategories();