Fix query see BT#12723

remotes/angel/1.11.x
jmontoyaa 8 years ago
parent 4c3ee4f7b0
commit e03cf21923
  1. 10
      plugin/studentfollowup/post.php

@ -51,16 +51,16 @@ if ($post) {
$qb = $em->createQueryBuilder();
$criteria = Criteria::create();
$criteria->where(Criteria::expr()->eq('parent', $post->getId()));
if (!empty($post->getParent())) {
$criteria->where(Criteria::expr()->in('parent', [$post->getParent()->getId(), $post->getId()]));
} else {
$criteria->where(Criteria::expr()->eq('parent', $post->getId()));
}
if ($showPrivate == false) {
$criteria->andWhere(Criteria::expr()->eq('private', false));
}
if (!empty($post->getParent())) {
$criteria->andWhere(Criteria::expr()->eq('parent', $post->getParent()));
}
$criteria->orWhere(Criteria::expr()->eq('id', $post->getId()));
$qb

Loading…
Cancel
Save