Updating app.* files

1.10.x
Julio Montoya 12 years ago
parent 4fc32e485b
commit 8183b55201
  1. 10
      web/app.php
  2. 8
      web/app_dev.php

@ -1,5 +1,7 @@
<?php
umask(0000);
use Symfony\Component\ClassLoader\ApcClassLoader;
//use Symfony\Component\HttpFoundation\Request;
@ -21,17 +23,13 @@ require_once __DIR__.'/legacy.php';
// if you want to use the SonataPageBundle with multisite
// using different relative paths, you must change the request
// object to use the SiteRequest
use Sonata\PageBundle\Request\SiteRequest as Request;
use Sonata\PageBundle\Request\RequestFactory;
$request = RequestFactory::createFromGlobals('host_with_path');
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

@ -24,11 +24,15 @@ require_once __DIR__.'/legacy.php';
// if you want to use the SonataPageBundle with multisite
// using different relative paths, you must change the request
// object to use the SiteRequest
use Sonata\PageBundle\Request\SiteRequest as Request;
$request = Request::createFromGlobals();
use Sonata\PageBundle\Request\RequestFactory;
//$request = Request::createFromGlobals('host_with_path');
$request = RequestFactory::createFromGlobals('host_with_path');
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

Loading…
Cancel
Save