The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Fixed non-public news display issue

Non-public news items didn't appear at all.
master
Polonkai Gergely 11 years ago
parent acc64ee66d
commit ff1e3fd9fc
  1. 2
      src/KekRozsak/FrontBundle/Twig/NewsExtension.php

@ -21,7 +21,7 @@ class NewsExtension extends \Twig_Extension
{
$newsRepo = $this->_doctrine->getRepository('KekRozsakFrontBundle:News');
$searchCriteria = array();
if (!$this->_securityContext->getToken() instanceof Symfony\Component\Security\Core\Authentication\Token\AnonymousToken)
if (!is_object($this->_securityContext->getToken()->getUser()))
$searchCriteria['public'] = true;
$news = $newsRepo->findBy($searchCriteria, array('createdAt' => 'DESC'), 4);

Loading…
Cancel
Save