mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 20:43:25 +00:00
Fixed codestyle
This commit is contained in:
@@ -37,7 +37,6 @@ class Publications implements ControllerProviderInterface
|
||||
});
|
||||
|
||||
$controllers->get('/list/', function(PhraseaApplication $app) {
|
||||
|
||||
$feeds = $app['EM']->getRepository('Entities\Feed')->getAllForUser(
|
||||
$app['authentication']->getUser()
|
||||
);
|
||||
@@ -47,7 +46,6 @@ class Publications implements ControllerProviderInterface
|
||||
})->bind('admin_feeds_list');
|
||||
|
||||
$controllers->post('/create/', function(PhraseaApplication $app, Request $request) {
|
||||
|
||||
if ('' === $title = trim($request->request->get('title', ''))) {
|
||||
$app->abort(400, "Bad request");
|
||||
}
|
||||
|
@@ -215,13 +215,11 @@ class Feed implements ControllerProviderInterface
|
||||
|
||||
$feeds = $app['EM']->getRepository('Entities\Feed')->getAllForUser($app['authentication']->getUser());
|
||||
|
||||
$datas = $app['twig']->render('prod/feeds/feeds.html.twig'
|
||||
, array(
|
||||
'feeds' => $feeds
|
||||
, 'feed' => new Aggregate($app['EM'], $feeds)
|
||||
, 'page' => $page
|
||||
)
|
||||
);
|
||||
$datas = $app['twig']->render('prod/feeds/feeds.html.twig', array(
|
||||
'feeds' => $feeds,
|
||||
'feed' => new Aggregate($app['EM'], $feeds),
|
||||
'page' => $page
|
||||
));
|
||||
|
||||
return new Response($datas);
|
||||
})->bind('prod_feeds');
|
||||
@@ -247,7 +245,11 @@ class Feed implements ControllerProviderInterface
|
||||
|
||||
$aggregate = new Aggregate($app['EM'], $feeds);
|
||||
|
||||
$link = $app['feed.aggregate-link-generator']->generate($aggregate, $app['authentication']->getUser(), AggregateLinkGenerator::FORMAT_RSS, null, $renew);
|
||||
$link = $app['feed.aggregate-link-generator']->generate($aggregate,
|
||||
$app['authentication']->getUser(),
|
||||
AggregateLinkGenerator::FORMAT_RSS,
|
||||
null, $renew
|
||||
);
|
||||
|
||||
$output = array(
|
||||
'texte' => '<p>' . _('publication::Voici votre fil RSS personnel. Il vous permettra d\'etre tenu au courrant des publications.')
|
||||
|
@@ -204,14 +204,14 @@ class Aggregate implements FeedInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function hasPage($page, $pageSize)
|
||||
public function hasPage($pageNumber, $nbEntriesByPage)
|
||||
{
|
||||
if (0 >= $pageSize) {
|
||||
if (0 >= $nbEntriesByPage) {
|
||||
throw new LogicException;
|
||||
}
|
||||
|
||||
$count = $this->getCountTotalEntries();
|
||||
if (0 > $page && $page <= $count / $pageSize) {
|
||||
if (0 > $pageNumber && $pageNumber <= $count / $nbEntriesByPage) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -68,10 +68,10 @@ interface FeedInterface
|
||||
/**
|
||||
* Returns a boolean indicating whether the feed has a given page.
|
||||
*
|
||||
* @param integer $page
|
||||
* @param integer $pageSize
|
||||
* @param integer $pageNumber
|
||||
* @param integer $nbEntriesByPage
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function hasPage($page, $pageSize);
|
||||
public function hasPage($pageNumber, $nbEntriesByPage);
|
||||
}
|
||||
|
@@ -531,14 +531,13 @@ class Feed implements FeedInterface
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasPage($page, $pageSize)
|
||||
public function hasPage($pageNumber, $nbEntriesByPage)
|
||||
{
|
||||
if (0 >= $pageSize) {
|
||||
if (0 >= $nbEntriesByPage) {
|
||||
throw new LogicException;
|
||||
}
|
||||
|
||||
$count = $this->getCountTotalEntries();
|
||||
if (0 > $page && $page <= $count / $pageSize) {
|
||||
if (0 > $pageNumber && $pageNumber <= $count / $nbEntriesByPage) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Repositories;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Repositories;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Repositories;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Repositories;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Repositories;
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Repositories;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
@@ -121,7 +121,6 @@ class eventsmanager_notify_feed extends eventsmanager_notifyAbstract
|
||||
}
|
||||
|
||||
$this->broker->notify($user_to_notif->get_id(), __CLASS__, $datas, $mailed);
|
||||
|
||||
}
|
||||
$start += $perLoop;
|
||||
} while (count($results) > 0);
|
||||
|
Reference in New Issue
Block a user