[BUGFIX] Respect deleted/hidden
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Fri, 15 Jun 2012 12:24:19 +0000 (14:24 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Fri, 15 Jun 2012 12:24:19 +0000 (14:24 +0200)
Respect settings for deleted/hidden-flags inside
manually created query.

Change-Id: I45f3af54d999b6d6e1b721152816124add7b2b57

Classes/Domain/Repository/QuestionRepository.php

index eb13a87..fd18ef5 100644 (file)
@@ -72,6 +72,8 @@ class Tx_Questionrating_Domain_Repository_QuestionRepository extends Tx_Extbase_
                                                                                        'WHERE ' .
                                                                                        'question.status = "' . $status . '" AND ' .
                                                                                        'question.active = 1 AND ' .
+                                                                                       'question.deleted = 0 AND ' .
+                                                                                       'question.hidden = 0 AND ' .
                                                                                        'question.uid = rating.question AND ' .
                                                                                        'rating.user = ' . $user->getUid()
                                                                        )->execute();
@@ -90,6 +92,8 @@ class Tx_Questionrating_Domain_Repository_QuestionRepository extends Tx_Extbase_
                                                                                        '(question.status = "final" OR ' .
                                                                                        'question.status = "review") AND ' .
                                                                                        'question.active = 1 AND ' .
+                                                                                       'question.deleted = 0 AND ' .
+                                                                                       'question.hidden = 0 AND ' .
                                                                                        'question.uid = rating.question AND ' .
                                                                                        'rating.user = ' . $user->getUid()
                                                                        )->execute();