Skip to content

Commit b6eab22

Browse files
committed
finish refactoring
1 parent 0fd61d9 commit b6eab22

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Repository/PostRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public function searchQuery($options)
1414
$qb = $this->createQueryBuilder('a');
1515

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

20-
$qb->orderBy()->descending()->field('a.date');
20+
$qb->orderBy()->desc()->field('a.date');
2121
return $qb->getQuery();
2222
}
2323

Tagging/PHPCRStringStrategy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function getWeightedTags($blogId)
1818
{
1919
$qb = $this->postRep->createQueryBuilder('a');
2020
$qb->select('tags');
21-
$qb->where()->descendant('a', $blogId); // select only children of given blog
21+
$qb->where()->descendant($blogId, 'a'); // select only children of given blog
2222
$q = $qb->getQuery();
2323
$res = $q->getPhpcrNodeResult();
2424
$rows = $res->getRows();

0 commit comments

Comments
 (0)