Fix url parameter

remove unused namespace
This commit is contained in:
Nicolas Le Goff
2012-10-09 20:59:04 +02:00
parent cde9ce18ae
commit 33c63bb038
2 changed files with 4 additions and 2 deletions

View File

@@ -728,6 +728,9 @@ class Login implements ControllerProviderInterface
case 'session' : case 'session' :
$warning = _('Error while authentication, please retry or contact an admin if problem persists'); $warning = _('Error while authentication, please retry or contact an admin if problem persists');
break; break;
case 'unexpected' :
$warning = _('An unexpected error occured during authentication process, please contact an admin');
break;
} }
if (ctype_digit($request->query->get('usr'))) { if (ctype_digit($request->query->get('usr'))) {
@@ -984,7 +987,7 @@ class Login implements ControllerProviderInterface
return $app->redirect($url); return $app->redirect($url);
} catch (\Exception $e) { } catch (\Exception $e) {
return $app->redirect("/login/?redirect=" . $request->request->get('redirect') . "&error=" . _('An error occured')); return $app->redirect("/login/?redirect=" . $request->request->get('redirect') . "&error=unexpected");
} }
} else { } else {
return $app->redirect("/login/"); return $app->redirect("/login/");

View File

@@ -7,7 +7,6 @@ use Alchemy\Phrasea\Border\File;
use Doctrine\Common\DataFixtures\Loader; use Doctrine\Common\DataFixtures\Loader;
use Silex\WebTestCase; use Silex\WebTestCase;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpKernel\Client; use Symfony\Component\HttpKernel\Client;
use Symfony\Component\DomCrawler\Crawler; use Symfony\Component\DomCrawler\Crawler;