mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 21:13:26 +00:00
removed findallpublic method
This commit is contained in:
@@ -725,7 +725,7 @@ class Login implements ControllerProviderInterface
|
|||||||
$app->addFlash('error', _('login::erreur: No available connection - Please contact sys-admin'));
|
$app->addFlash('error', _('login::erreur: No available connection - Please contact sys-admin'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$feeds = $app['EM']->getRepository('Entities\Feed')->findAllPublic();
|
$feeds = $app['EM']->getRepository('Entities\Feed')->findBy(array('public' => true), array('updated_on' => 'DESC'));
|
||||||
|
|
||||||
$form = $app->form(new PhraseaAuthenticationForm());
|
$form = $app->form(new PhraseaAuthenticationForm());
|
||||||
$form->setData(array(
|
$form->setData(array(
|
||||||
|
@@ -227,6 +227,6 @@ class Aggregate implements FeedInterface
|
|||||||
*/
|
*/
|
||||||
public static function getPublic(Application $app)
|
public static function getPublic(Application $app)
|
||||||
{
|
{
|
||||||
return new static($app['EM'], $app['EM']->getRepository('Entities\Feed')->findAllPublic());
|
return new static($app['EM'], $app['EM']->getRepository('Entities\Feed')->findBy(array('public' => true), array('updated_on' => 'DESC')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -49,22 +49,6 @@ class SessionRepository extends EntityRepository
|
|||||||
return $query->getResult();
|
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';
|
|
||||||
|
|
||||||
$query = $this->_em->createQuery($dql);
|
|
||||||
|
|
||||||
return $query->getResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the given feed if the user can access to it.
|
* Returns the given feed if the user can access to it.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user