This commit is contained in:
Romain Neutron
2013-08-30 13:48:13 +02:00
parent 817f5094a1
commit 447cb60327
18 changed files with 14 additions and 32 deletions

View File

@@ -12,7 +12,6 @@
namespace Alchemy\Phrasea\Command\Developer;
use Alchemy\Phrasea\Command\Command;
use Alchemy\Phrasea\Exception\InvalidArgumentException;
use Alchemy\BinaryDriver\Exception\ExecutionFailureException;
use Alchemy\Phrasea\Exception\RuntimeException;
use Symfony\Component\Console\Input\InputInterface;

View File

@@ -4,16 +4,7 @@ namespace Alchemy\Phrasea\Command\Developer;
use Alchemy\Phrasea\Command\Command;
use Alchemy\Phrasea\Core\Provider\ORMServiceProvider;
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\Configuration as ORMConfiguration;
use Doctrine\ORM\Tools\SchemaTool;
use Doctrine\ORM\EntityManager;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\Common\Annotations\FileCacheReader;
use Doctrine\Common\EventManager;
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
use Doctrine\ORM\Mapping\Driver\DriverChain;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Filesystem\Filesystem;

View File

@@ -1091,7 +1091,7 @@ class Databox implements ControllerProviderInterface
'medias' => array()
);
foreach($colDetails as $subdefName => $subdefDetails) {
foreach ($colDetails as $subdefName => $subdefDetails) {
$details[$collName]['total_subdefs'] += $subdefDetails['n'];
$total['total_subdefs'] += $subdefDetails['n'];
$details[$collName]['total_size'] += $subdefDetails['siz'];

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Controller\Admin;
use Alchemy\Phrasea\Application as PhraseaApplication;
use Alchemy\Phrasea\Metadata\TagProvider;
use Alchemy\Phrasea\Vocabulary\Controller as VocabularyController;
use Silex\Application;

View File

@@ -601,13 +601,14 @@ class Users implements ControllerProviderInterface
$columns = array_filter($columnsSanitized, function ($columnName) use (&$out, $equivalenceToMysqlField) {
if (!isset($equivalenceToMysqlField[$columnName])) {
$out['ignored_row'][] = $columnName;
return false;
}
return true;
});
foreach($columns as $columnName) {
foreach ($columns as $columnName) {
if ($equivalenceToMysqlField[$columnName] === 'usr_login') {
$loginDefined = true;
}
@@ -667,7 +668,7 @@ class Users implements ControllerProviderInterface
if ($mailToAdd === "") {
$out['errors'][] = sprintf(_("Mail line %d is empty"), $nbLine + 1);
} else if (false !== \User_Adapter::get_usr_id_from_email($app, $mailToAdd)) {
} elseif (false !== \User_Adapter::get_usr_id_from_email($app, $mailToAdd)) {
$out['errors'][] = sprintf(_("Email '%s' for login '%s' already exists in database"), $mailToAdd, $loginToAdd);
} else {
$mailValid = true;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Controller\Thesaurus;
use Alchemy\Phrasea\Application as PhraseaApplication;
use Silex\Application;
use Silex\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;

View File

@@ -12,7 +12,6 @@
namespace Alchemy\Phrasea\Core\Event\Subscriber;
use Silex\Application;
use Alchemy\Phrasea\Application as PhraseaApplication;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;

View File

@@ -65,6 +65,7 @@ class BytesConverter extends \Twig_Extension
return round($bytes / pow(1024, ($i = floor(log($bytes, 1024)))), $precision) . ' ' . $unit[$i];
default:
$i = array_search($suffix, $unit);
return round($bytes / pow(1024, $i), $precision) . ' ' . $unit[$i];
}
}

View File

@@ -11,7 +11,6 @@
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Exception\SessionNotFound;
use Alchemy\Geonames\Exception\ExceptionInterface as GeonamesExceptionInterface;
use Entities\FtpCredential;

View File

@@ -103,8 +103,7 @@ class patch_3902 implements patchInterface
$user->setRequestNotificationsActivated(!!$row['request_notifications']);
$user->setSaltedPassword(!!$row['salted_password']);
switch ($row['usr_sexe'])
{
switch ($row['usr_sexe']) {
case 0:
$gender = User::GENDER_MISS;
break;

View File

@@ -2,8 +2,6 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod;
use Alchemy\Phrasea\Controller\RecordsRequest;
use Doctrine\Common\Collections\ArrayCollection;
use Entities\Order;
use Entities\OrderElement;

View File

@@ -46,7 +46,7 @@ class UserTest extends \PHPUnit_Framework_TestCase
public function testSetLocale()
{
foreach(array_keys(Application::getAvailableLanguages()) as $locale) {
foreach (array_keys(Application::getAvailableLanguages()) as $locale) {
$this->user->setLocale($locale);
$this->assertEquals($this->user->getLocale(), $locale);
}

View File

@@ -1,8 +1,5 @@
<?php
use Alchemy\Phrasea\Controller\RecordsRequest;
use Doctrine\Common\Collections\ArrayCollection;
class record_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
{
/**