[FrameworkBundle] fixed ESI calls
This commit is contained in:
parent
06e1de9742
commit
ce536cdd5a
@ -116,18 +116,30 @@ class HttpKernel extends BaseHttpKernel
|
||||
}
|
||||
|
||||
if ($this->esiSupport && (true === $options['standalone'] || 'esi' === $options['standalone'])) {
|
||||
$uri = $this->generateInternalUri($controller, $options['attributes'], $options['query']);
|
||||
if (0 === strpos($controller, 'http://') || 0 === strpos($controller, 'https://')) {
|
||||
$uri = $controller;
|
||||
} else {
|
||||
$uri = $this->generateInternalUri($controller, $options['attributes'], $options['query']);
|
||||
}
|
||||
|
||||
$alt = '';
|
||||
if ($options['alt']) {
|
||||
$alt = $this->generateInternalUri($options['alt'][0], isset($options['alt'][1]) ? $options['alt'][1] : array(), isset($options['alt'][2]) ? $options['alt'][2] : array());
|
||||
if (is_string($options['alt']) && (0 === strpos($options['alt'], 'http://') || 0 === strpos($options['alt'], 'https://'))) {
|
||||
$alt = $options['alt'];
|
||||
} else {
|
||||
$alt = $this->generateInternalUri($options['alt'][0], isset($options['alt'][1]) ? $options['alt'][1] : array(), isset($options['alt'][2]) ? $options['alt'][2] : array());
|
||||
}
|
||||
}
|
||||
|
||||
return $this->container->get('esi')->renderIncludeTag($uri, $alt, $options['ignore_errors'], $options['comment']);
|
||||
}
|
||||
|
||||
if ('js' === $options['standalone']) {
|
||||
$uri = $this->generateInternalUri($controller, $options['attributes'], $options['query'], false);
|
||||
if (0 === strpos($controller, 'http://') || 0 === strpos($controller, 'https://')) {
|
||||
$uri = $controller;
|
||||
} else {
|
||||
$uri = $this->generateInternalUri($controller, $options['attributes'], $options['query'], false);
|
||||
}
|
||||
$defaultContent = null;
|
||||
|
||||
if ($template = $this->container->getParameter('templating.hinclude.default_template')) {
|
||||
|
Reference in New Issue
Block a user