Restored methods in repositories

This commit is contained in:
Andrey
2013-08-27 15:52:22 +02:00
parent d8cac877e6
commit 5b0925996d
2 changed files with 30 additions and 20 deletions

View File

@@ -25,31 +25,15 @@ class FeedRepository extends EntityRepository
$base_ids = array_keys($user->ACL()->get_granted_base());
$dql = 'SELECT f FROM Entities\Feed f
WHERE f.base_id IS NULL ';
WHERE f.baseId IS NULL ';
if (count($base_ids) > 0) {
$dql .= ' OR f.base_id
$dql .= ' OR f.baseId
IN (' . implode(', ', $base_ids) . ') ';
}
$dql .= ' OR f.public = true
ORDER BY f.updated_on DESC';
$query = $this->_em->createQuery($dql);
return $query->getResult();
}
/**
* Returns all the public feeds.
*
* @return Collection
*/
public function findAllPublic()
{
$dql = 'SELECT f FROM Entities\Feed f
WHERE f.public = true
ORDER BY f.updated_on DESC';
ORDER BY f.updatedOn DESC';
$query = $this->_em->createQuery($dql);
@@ -88,7 +72,7 @@ class FeedRepository extends EntityRepository
public function findByIdArray(array $feed_id)
{
$dql = 'SELECT f FROM Entities\Feed f
ORDER BY f.created_on DESC
ORDER BY f.createdOn DESC
WHERE f.id IN (' . implode(",", $feed_id) . ')';
$query = $this->_em->createQuery($dql);