This commit is contained in:
Romain Neutron
2013-10-31 14:19:09 +01:00
parent e4386660df
commit 13dd86c67f
80 changed files with 297 additions and 321 deletions

View File

@@ -14,7 +14,6 @@ namespace Alchemy\Phrasea\Command\Task;
use Alchemy\TaskManager\TaskManager; use Alchemy\TaskManager\TaskManager;
use Alchemy\Phrasea\Command\Command; use Alchemy\Phrasea\Command\Command;
use Alchemy\TaskManager\Event\TaskManagerSubscriber\LockFileSubscriber; use Alchemy\TaskManager\Event\TaskManagerSubscriber\LockFileSubscriber;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;

View File

@@ -15,7 +15,6 @@ use Alchemy\Phrasea\Command\Command;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputOption;
use Alchemy\Phrasea\TaskManager\TaskManagerStatus;
class SchedulerState extends Command class SchedulerState extends Command
{ {

View File

@@ -15,7 +15,6 @@ use Alchemy\Phrasea\Command\Command;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
class TaskStart extends Command class TaskStart extends Command
{ {

View File

@@ -15,7 +15,6 @@ use Alchemy\Phrasea\Command\Command;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
class TaskStop extends Command class TaskStop extends Command
{ {

View File

@@ -12,7 +12,6 @@
namespace Alchemy\Phrasea\Model\Entities; namespace Alchemy\Phrasea\Model\Entities;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/** /**
* @ORM\Table(name="AggregateTokens") * @ORM\Table(name="AggregateTokens")

View File

@@ -561,6 +561,7 @@ class Feed implements FeedInterface
|| in_array($coll->get_base_id(), array_keys($user->ACL()->get_granted_base()))) { || in_array($coll->get_base_id(), array_keys($user->ACL()->get_granted_base()))) {
return true; return true;
} }
return false; return false;
} }
} }

View File

@@ -12,7 +12,6 @@
namespace Alchemy\Phrasea\Model\Entities; namespace Alchemy\Phrasea\Model\Entities;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/** /**
* @ORM\Table(name="FeedTokens") * @ORM\Table(name="FeedTokens")

View File

@@ -13,7 +13,6 @@ namespace Alchemy\Phrasea\Model\Entities;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Alchemy\Phrasea\Application;
/** /**
* @ORM\Table(name="FtpCredential") * @ORM\Table(name="FtpCredential")

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Model\Entities; namespace Alchemy\Phrasea\Model\Entities;
use Alchemy\Phrasea\Application;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Model\Entities; namespace Alchemy\Phrasea\Model\Entities;
use Alchemy\Phrasea\Application;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Model\Entities; namespace Alchemy\Phrasea\Model\Entities;
use Alchemy\Phrasea\Application;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Model\Manager; namespace Alchemy\Phrasea\Model\Manager;
use Alchemy\Phrasea\Exception\InvalidArgumentException;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\Common\Persistence\ObjectManager;
use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\Entities\User;
use Alchemy\Phrasea\Model\Entities\UserSetting; use Alchemy\Phrasea\Model\Entities\UserSetting;

View File

@@ -15,10 +15,8 @@ use Alchemy\Geonames\Connector as GeonamesConnector;
use Alchemy\Geonames\Exception\ExceptionInterface as GeonamesExceptionInterface; use Alchemy\Geonames\Exception\ExceptionInterface as GeonamesExceptionInterface;
use Alchemy\Phrasea\Model\Manager\UserManager; use Alchemy\Phrasea\Model\Manager\UserManager;
use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\Entities\User;
use Alchemy\Phrasea\Model\Repositories\UserRepository;
use Alchemy\Phrasea\Exception\RuntimeException; use Alchemy\Phrasea\Exception\RuntimeException;
use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Exception\InvalidArgumentException;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
/** /**

View File

@@ -3,8 +3,6 @@
namespace Alchemy\Phrasea\Model\Repositories; namespace Alchemy\Phrasea\Model\Repositories;
use Doctrine\ORM\EntityRepository; use Doctrine\ORM\EntityRepository;
use Alchemy\Phrasea\Model\Entities\Feed;
use Alchemy\Phrasea\Model\Entities\FeedPublisher;
/** /**
* FeedPublisherRepository * FeedPublisherRepository

View File

@@ -2,9 +2,7 @@
namespace Alchemy\Phrasea\Model\Repositories; namespace Alchemy\Phrasea\Model\Repositories;
use Alchemy\Phrasea\Application;
use Doctrine\ORM\EntityRepository; use Doctrine\ORM\EntityRepository;
use Alchemy\Phrasea\Model\Entities\Feed;
/** /**
* FeedRepository * FeedRepository

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Model\Repositories; namespace Alchemy\Phrasea\Model\Repositories;
use Alchemy\Phrasea\Application;
use Doctrine\ORM\EntityRepository; use Doctrine\ORM\EntityRepository;
/** /**

View File

@@ -118,7 +118,6 @@ class FtpJob extends AbstractJob
, " (" . date('r') . ")" , " (" . date('r') . ")"
) . PHP_EOL; ) . PHP_EOL;
$this->log('debug', $line); $this->log('debug', $line);
try { try {

View File

@@ -105,6 +105,7 @@ class FtpPullJob extends AbstractJob
if (!$this->isStarted()) { if (!$this->isStarted()) {
$ftp->close(); $ftp->close();
$this->log('debug', "Stopping"); $this->log('debug', "Stopping");
return; return;
} }

View File

@@ -13,7 +13,7 @@ namespace Alchemy\Phrasea\TaskManager\Log;
use Alchemy\Phrasea\Model\Entities\Task; use Alchemy\Phrasea\Model\Entities\Task;
class LogFileFactory class LogFilefactory
{ {
private $root; private $root;

View File

@@ -79,6 +79,7 @@ class TaskManagerStatus
{ {
if (!isset($this->conf['task-manager'])) { if (!isset($this->conf['task-manager'])) {
$this->conf['task-manager'] = array('status' => static::STATUS_STARTED); $this->conf['task-manager'] = array('status' => static::STATUS_STARTED);
return; return;
} }
if (!isset($this->conf['task-manager']['status'])) { if (!isset($this->conf['task-manager']['status'])) {

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Tests\Phrasea\Model\Manipulator; namespace Alchemy\Tests\Phrasea\Model\Manipulator;
use Alchemy\Phrasea\Model\Manager\UserManager;
use Alchemy\Phrasea\Model\Entities\UserNotificationSetting; use Alchemy\Phrasea\Model\Entities\UserNotificationSetting;
use Alchemy\Phrasea\Model\Entities\UserQuery; use Alchemy\Phrasea\Model\Entities\UserQuery;
use Alchemy\Phrasea\Model\Entities\UserSetting; use Alchemy\Phrasea\Model\Entities\UserSetting;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Tests\Phrasea\Model\Manipulator; namespace Alchemy\Tests\Phrasea\Model\Manipulator;
use Doctrine\Common\Collections\ArrayCollection;
use Alchemy\Phrasea\Model\Manipulator\UserManipulator; use Alchemy\Phrasea\Model\Manipulator\UserManipulator;
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\Entities\User;

View File

@@ -2,10 +2,6 @@
namespace Alchemy\Tests\Phrasea\Model\Repositories; namespace Alchemy\Tests\Phrasea\Model\Repositories;
use Alchemy\Phrasea\Model\Entities\FtpExport;
use Alchemy\Phrasea\Model\Entities\FtpExportElement;
use Gedmo\Timestampable\TimestampableListener;
class FeedItemRepositoryTest extends \PhraseanetPHPUnitAbstract class FeedItemRepositoryTest extends \PhraseanetPHPUnitAbstract
{ {
public function testIs_record_in_public_feedInPublicFeed() public function testIs_record_in_public_feedInPublicFeed()

View File

@@ -47,7 +47,6 @@ class LiveInformationTest extends \PhraseanetPHPUnitAbstract
$this->assertEquals($expected, $live->getManager()); $this->assertEquals($expected, $live->getManager());
} }
public function testItReturnsWorkingTaskStatus() public function testItReturnsWorkingTaskStatus()
{ {
$task = new Task(); $task = new Task();

View File

@@ -8,7 +8,6 @@ use Alchemy\Phrasea\Model\Entities\AggregateToken;
use Alchemy\Phrasea\Model\Entities\Feed; use Alchemy\Phrasea\Model\Entities\Feed;
use Alchemy\Phrasea\Model\Entities\FeedEntry; use Alchemy\Phrasea\Model\Entities\FeedEntry;
use Alchemy\Phrasea\Model\Entities\FeedItem; use Alchemy\Phrasea\Model\Entities\FeedItem;
use Alchemy\Phrasea\Model\Entities\FeedPublisher;
use Alchemy\Phrasea\Model\Entities\FeedToken; use Alchemy\Phrasea\Model\Entities\FeedToken;
use Alchemy\Phrasea\Model\Entities\Task; use Alchemy\Phrasea\Model\Entities\Task;
use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\Entities\User;