Skip to content

Commit

Permalink
finish refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
lsmith77 committed Sep 25, 2013
1 parent 0fd61d9 commit b6eab22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Repository/PostRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ public function searchQuery($options)
$qb = $this->createQueryBuilder('a');

if ($options['blog_id']) {
$qb->where()->descendant('a.' . $options['blog_id']);
$qb->where()->descendant($options['blog_id'], 'a');
}

$qb->orderBy()->descending()->field('a.date');
$qb->orderBy()->desc()->field('a.date');
return $qb->getQuery();
}

Expand Down
2 changes: 1 addition & 1 deletion Tagging/PHPCRStringStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getWeightedTags($blogId)
{
$qb = $this->postRep->createQueryBuilder('a');
$qb->select('tags');
$qb->where()->descendant('a', $blogId); // select only children of given blog
$qb->where()->descendant($blogId, 'a'); // select only children of given blog
$q = $qb->getQuery();
$res = $q->getPhpcrNodeResult();
$rows = $res->getRows();
Expand Down

0 comments on commit b6eab22

Please sign in to comment.