Fixed the privacy issue - now for sure
This commit is contained in:
		| @@ -2,6 +2,7 @@ | ||||
| <html> | ||||
| 	<head> | ||||
| 		<title>Kék Rózsák{% block title %}{% endblock %}</title> | ||||
| 		<meta charset="utf8" /> | ||||
| 		<link rel="stylesheet" type="text/css" href="{{ asset('css/kekrozsak_front.css') }}" /> | ||||
| 		<link rel="stylesheet" type="text/css" href="{{ asset('css/jquery.tooltip.css') }}" /> | ||||
| {% block additional_css %}{% endblock %} | ||||
|   | ||||
| @@ -5,4 +5,7 @@ | ||||
| {% if article.source %} | ||||
| <p class="forras">Forrás: {{ article.source }}</p> | ||||
| {% endif %} | ||||
| {% if app.user %} | ||||
| <p class="szerzo">{{ article.createdBy.displayName }}</p> | ||||
| {% endif %} | ||||
| {% endblock content %} | ||||
|   | ||||
| @@ -21,7 +21,7 @@ class NewsExtension extends \Twig_Extension | ||||
| 	{ | ||||
| 		$newsRepo = $this->_doctrine->getRepository('KekRozsakFrontBundle:News'); | ||||
| 		$searchCriteria = array(); | ||||
| 		if (!is_object($this->_securityContext->getToken()->getUser())) | ||||
| 		if (!is_object($this->_securityContext->getToken()) || !is_object($this->_securityContext->getToken()->getUser())) | ||||
| 			$searchCriteria['public'] = true; | ||||
|  | ||||
| 		$news = $newsRepo->findBy($searchCriteria, array('createdAt' => 'DESC'), 4); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user