Commit 333465f4 authored by Tino Goratsch's avatar Tino Goratsch

- restored the missing widgets of the ACP3 default layout

- minor fixes and improvements
parent 1b12782b
......@@ -4,7 +4,7 @@
* See the LICENCE file at the top-level module directory for licencing details.
*/
namespace ACP3\Core\Application\Bootstrap;
namespace ACP3\Core\Application;
use ACP3\Core\Session\SessionHandlerInterface;
......@@ -20,10 +20,10 @@ use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface;
use Symfony\Component\HttpKernel\HttpKernelInterface;
/**
* Class HttpCache
* @package ACP3\Core\Application\Bootstrap
* Class BootstrapCache
* @package ACP3\Core\Application
*/
class HttpCache extends EventDispatchingHttpCache
class BootstrapCache extends EventDispatchingHttpCache
{
const JAVASCRIPTS_REGEX_PATTERN = MoveToBottom::ELEMENT_CATCHER_REGEX_PATTERN;
const PLACEHOLDER = '</body>';
......
......@@ -8,7 +8,6 @@ namespace ACP3\Core\Application;
use ACP3\Core\Application\Event\ControllerActionDispatcherDispatchEvent;
use ACP3\Core\Controller\ActionInterface;
use ACP3\Core\Controller\AreaEnum;
use ACP3\Core\Http\RequestInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
......@@ -70,15 +69,6 @@ class ControllerActionDispatcher
$serviceId = $this->buildControllerServiceId();
}
if ($this->request->getArea() === AreaEnum::AREA_WIDGET &&
!in_array(
$this->request->getServer()->get('REMOTE_ADDR'),
$this->request->getSymfonyRequest()->getTrustedProxies()
)
) {
throw new \RuntimeException('Loading widgets from outside is not allowed!');
}
if ($this->container->has($serviceId)) {
$this->eventDispatcher->dispatch(
'core.application.controller_action_dispatcher.before_dispatch',
......
......@@ -7,7 +7,6 @@
namespace ACP3\Modules\ACP3\Newsletter\Controller\Widget\Index;
use ACP3\Core;
use ACP3\Modules\ACP3\Captcha;
/**
* Class Index
......@@ -40,10 +39,11 @@ class Index extends Core\Controller\WidgetAction
*/
public function execute($template = '')
{
var_dump($this->request->getSymfonyRequest()->server->all());
$this->setTemplate($template !== '' ? $template : 'Newsletter/Widget/index.index.tpl');
return [
'form_token' => $this->formTokenHelper->renderFormToken('newsletter/index/index')
'form_token' => $this->formTokenHelper->renderFormToken()
];
}
}
......@@ -62,10 +62,12 @@
</main>
<div class="col-md-2 hidden-xs hidden-sm">
{load_module module="widget/news"}
{load_module module="widget/newsletter"}
{load_module module="widget/files"}
{load_module module="widget/articles"}
{load_module module="widget/articles/index/single" args=['id' => 1]}
{load_module module="widget/gallery"}
{load_module module="widget/polls"}
</div>
</div>
</div>
......
......@@ -31,7 +31,7 @@ $cacheStore = new \Symfony\Component\HttpKernel\HttpCache\Store(
$kernel->getAppPath()->getCacheDir() . 'http/'
);
$appCache = new \ACP3\Core\Application\Bootstrap\HttpCache(
$appCache = new \ACP3\Core\Application\BootstrapCache(
$kernel,
$cacheStore,
new \Symfony\Component\HttpKernel\HttpCache\Esi(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment