Skip to content

Commit

Permalink
keep orginal order in search by ids
Browse files Browse the repository at this point in the history
  • Loading branch information
ahilles107 committed Apr 21, 2015
1 parent bc127ac commit 46912ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ public function getArticlesByCriteria($articleSearchCriteria, $ids = array(), $o
->setParameter('workflowStatus', Article::STATUS_PUBLISHED);
}

$queryBuilder->orderBy('a.uploaded', $order);
if ($order != false) {
$queryBuilder->orderBy('a.uploaded', $order);
}

$countQueryBuilder = clone $queryBuilder;
$query = $queryBuilder->getQuery();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function getPlaylistsArticlesAction(Request $request, $id)
}

$articles = $em->getRepository('Newscoop\Entity\Article')
->getArticlesByCriteria(new ArticleSearchCriteria(), $articlesIds, $onlyPublished)
->getArticlesByCriteria(new ArticleSearchCriteria(), $articlesIds, $onlyPublished, false)
->getResult();

$paginator = $this->get('newscoop.paginator.paginator_service');
Expand Down

0 comments on commit 46912ea

Please sign in to comment.