sonata-project/SonataNewsBundle — pull request #40 by edwines (2011-12-29 19:01:46+00:00)
Title: Updated some query criteria

*PostController*: because the query for the tag page is **'t.slug LIKE :tag'** the value of the parameter can't be the object, but it should be the slug.

*PostManager*: Replaced **isset($urlParameters['category']** for **array_key_exists('category', $urlParameters)** because when the $urlParameter['category'] is NULL the getPublicationCategoryQueryParts() create the query 'p.category IS NULL'.

This mean if I get one post with the category 'test' and the slug 'my-post', the permalink is 'test/my-post'. Without the array_key_exists() condition 'blog/test/my-post' and 'blog/my-post' return the same page... when the correct should be a 404 error for the 'blog/my-post'.

Also added some conditions to only show the list of the public posts.