This commit is contained in:
Simon Vieille 2015-03-05 19:47:19 +01:00
parent fd30d137fc
commit 6c46a807f9
3 changed files with 31 additions and 37 deletions

View file

@ -4,9 +4,7 @@
defaultIdMethod="native"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xsd.propelorm.org/1.6/database.xsd">
<external-schema filename="../../../ContentManagerBundle/Resources/config/cms_schema.xml" referenceOnly="true"/>
<table name="slideshow_item" phpName="SlideshowItem">
<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true" />
<column name="uid" type="integer" required="true" />
@ -16,17 +14,12 @@
<column name="picture" type="varchar" size="128" required="true" />
<column name="content" type="longvarchar" required="true" />
<column name="link" type="varchar" size="255" />
<behavior name="uploadable">
<parameter name="fields" value="picture" />
<parameter name="paths" value="uploads/slideshow/" />
</behavior>
<foreign-key foreignTable="cms_block">
<reference local="cms_block_id" foreign="id"/>
</foreign-key>
</table>
</database>

View file

@ -2,11 +2,11 @@
namespace Trinity\Bundle\UserBundle\Handler;
use \Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler;
use \Symfony\Component\HttpFoundation\Request;
use \Symfony\Component\HttpFoundation\Response;
use \Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use \Symfony\Component\Security\Http\HttpUtils;
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Http\HttpUtils;
class AuthenticationSuccessHandler extends DefaultAuthenticationSuccessHandler
{
@ -30,6 +30,7 @@ class AuthenticationSuccessHandler extends DefaultAuthenticationSuccessHandler
$result = array('success' => true);
$response = new Response(json_encode($result));
$response->headers->set('Content-Type', 'application/json');
return $response;
}