From 1ab4a1c6de26ecf74a143c88830944bfe36ae981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20G=C3=B6tzinger?= Date: Thu, 15 Feb 2018 06:16:05 +0100 Subject: [PATCH] =?UTF-8?q?Umstellung=20auf=20eigene=20Ajax-Verarbeitung?= =?UTF-8?q?=20=C3=BCber=20Route=20"rateit"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ContaoManagerPlugin.php | 3 ++- src/Resources/contao/classes/RateIt.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ContaoManagerPlugin.php b/src/ContaoManagerPlugin.php index fb7db62..e839f1b 100644 --- a/src/ContaoManagerPlugin.php +++ b/src/ContaoManagerPlugin.php @@ -6,6 +6,7 @@ use Contao\CoreBundle\ContaoCoreBundle; use Contao\ManagerPlugin\Bundle\Config\BundleConfig; use Contao\ManagerPlugin\Bundle\BundlePluginInterface; use Contao\ManagerPlugin\Bundle\Parser\ParserInterface; +use Contao\ManagerPlugin\Routing\RoutingPluginInterface; use Symfony\Component\Config\Loader\LoaderResolverInterface; use Symfony\Component\HttpKernel\KernelInterface; @@ -14,7 +15,7 @@ use Symfony\Component\HttpKernel\KernelInterface; * * @author Carsten Götzinger */ -class ContaoManagerPlugin implements BundlePluginInterface +class ContaoManagerPlugin implements BundlePluginInterface, RoutingPluginInterface { /** * {@inheritdoc} diff --git a/src/Resources/contao/classes/RateIt.php b/src/Resources/contao/classes/RateIt.php index fc28fdb..b662067 100644 --- a/src/Resources/contao/classes/RateIt.php +++ b/src/Resources/contao/classes/RateIt.php @@ -44,6 +44,16 @@ class RateIt extends \Frontend { public function __construct() { parent::__construct(); + // See #4099 + if (!defined('BE_USER_LOGGED_IN')) + { + define('BE_USER_LOGGED_IN', false); + } + if (!defined('FE_USER_LOGGED_IN')) + { + define('FE_USER_LOGGED_IN', false); + } + $this->rateItFrontend = new RateItFrontend(); $this->loadLanguageFile('default');