This commit is contained in:
Romain Neutron
2013-05-29 21:21:02 +02:00
parent e36e7ad085
commit 38f38290c8
35 changed files with 1577 additions and 1592 deletions

View File

@@ -133,7 +133,6 @@ use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGenerator;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\Form\FormFactory;
use Symfony\Component\Form\FormTypeInterface;
use Symfony\Component\Form\FormBuilderInterface;

View File

@@ -12,8 +12,6 @@
namespace Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Application as PhraseaApplication;
use Alchemy\Phrasea\Authentication\Context;
use Alchemy\Phrasea\Core\Event\PreAuthenticate;
use Alchemy\Phrasea\Core\PhraseaEvents;
use Alchemy\Phrasea\Controller\Api\Oauth2;
use Alchemy\Phrasea\Controller\Api\V1;
@@ -63,7 +61,6 @@ return call_user_func(function($environment = 'prod') {
$app->mount('/api/oauthv2', new Oauth2());
$app->mount('/api/v1', new V1());
/**
* Route Errors
*/

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Alchemy\Phrasea\Authentication\Exception;;
namespace Alchemy\Phrasea\Authentication\Exception;
use Alchemy\Phrasea\Exception\RuntimeException;
use Symfony\Component\HttpFoundation\Response;

View File

@@ -11,8 +11,6 @@
namespace Alchemy\Phrasea\Authentication\Provider;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Exception\RuntimeException;
use Alchemy\Phrasea\Authentication\Provider\Token\Token;
use Alchemy\Phrasea\Authentication\Provider\Token\Identity;
use Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException;

View File

@@ -15,7 +15,6 @@ use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Authentication\Provider\Token\Token;
use Alchemy\Phrasea\Authentication\Provider\Token\Identity;
use Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException;
use Alchemy\Phrasea\Exception\RuntimeException;
use Guzzle\Http\Client as Guzzle;
use Guzzle\Http\ClientInterface;
use Guzzle\Common\Exception\GuzzleException;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Authentication\Provider;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Authentication\Provider\Token\Token;
use Alchemy\Phrasea\Authentication\Provider\Token\Identity;
use Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException;

View File

@@ -11,11 +11,9 @@
namespace Alchemy\Phrasea\Authentication\Provider;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Authentication\Provider\Token\Token;
use Alchemy\Phrasea\Authentication\Provider\Token\Identity;
use Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException;
use Alchemy\Phrasea\Exception\RuntimeException;
use Guzzle\Http\Client as Guzzle;
use Guzzle\Http\ClientInterface;
use Guzzle\Common\Exception\GuzzleException;

View File

@@ -11,11 +11,9 @@
namespace Alchemy\Phrasea\Authentication\Provider;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Authentication\Provider\Token\Token;
use Alchemy\Phrasea\Authentication\Provider\Token\Identity;
use Alchemy\Phrasea\Authentication\Exception\NotAuthenticatedException;
use Alchemy\Phrasea\Exception\RuntimeException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\Generator\UrlGenerator;

View File

@@ -61,6 +61,7 @@ class LessCompile extends Command
if (0 === $failures) {
$output->writeln('<info>Build done !</info>');
return 0;
}

View File

@@ -220,7 +220,8 @@ class Fields implements ControllerProviderInterface
return new Response($json, 200, array('Content-Type' => 'application/json'));
}
public function createField(Application $app, Request $request, $sbas_id) {
public function createField(Application $app, Request $request, $sbas_id)
{
$databox = $app['phraseanet.appbox']->get_databox((int) $sbas_id);
$data = $this->getFieldJsonFromRequest($app, $request);
@@ -243,7 +244,8 @@ class Fields implements ControllerProviderInterface
))));
}
public function listFields(Application $app, $sbas_id) {
public function listFields(Application $app, $sbas_id)
{
$databox = $app['phraseanet.appbox']->get_databox((int) $sbas_id);
return $app->json($databox->get_meta_structure()->toArray());

View File

@@ -12,7 +12,6 @@
namespace Alchemy\Phrasea\Controller\Api;
use Alchemy\Phrasea\Authentication\Context;
use Alchemy\Phrasea\Application as PhraseaApplication;
use Alchemy\Phrasea\Authentication\Exception\AccountLockedException;
use Alchemy\Phrasea\Authentication\Exception\RequireCaptchaException;
use Alchemy\Phrasea\Core\Event\PreAuthenticate;

View File

@@ -112,6 +112,7 @@ class caption_record implements caption_interface, cache_cacheableInterface
$buffer[$field->get_name()] = ctype_digit($val) ? (int) $val : $val;
}
}
return array('record' => array('description' => $buffer));
}

View File

@@ -147,4 +147,3 @@ class databox_descriptionStructure implements IteratorAggregate, Countable
return count($this->elements);
}
}

View File

@@ -61,4 +61,3 @@ class patch_379 implements patchInterface
return true;
}
}

View File

@@ -114,7 +114,6 @@ class patch_380a3 implements patchInterface
$stmt->closeCursor();
unset($stmt);
$sql = "CALL explode_log_table(',')";
$stmt = $conn->prepare($sql);
$stmt->execute();

View File

@@ -10,8 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration;
use Alchemy\Phrasea\Exception\RuntimeException;
class phrasea
{

View File

@@ -20,7 +20,7 @@ class unicode
const CONVERT_TO_ND = 'nd'; // no-diacritics
const CONVERT_TO_LCND = 'lcnd'; // lowercase no-diacritics
static protected $map = array(
protected static $map = array(
self::CONVERT_TO_LC => array(
"\x41" => "\x61" , /* U+0041: LATIN CAPITAL LETTER A -> U+0061: LATIN SMALL LETTER A */
"\x42" => "\x62" , /* U+0042: LATIN CAPITAL LETTER B -> U+0062: LATIN SMALL LETTER B */
@@ -1558,7 +1558,6 @@ class unicode
return mb_strpos($this->endCharacters_utf8, $string);
}
/**
* Converts a string
*