From 8b9b9a684ea8aa093ff9e5f44611856cd66de5aa Mon Sep 17 00:00:00 2001
From: Ernesto Baschny <ernst@cron-it.de>
Date: Tue, 4 Feb 2014 11:39:52 +0100
Subject: [PATCH] =?UTF-8?q?Revert=20"[BUGFIX]=C2=A0Frontend=20Login=20not?=
 =?UTF-8?q?=20added=20to=20CSC=20anymore"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit 373a90b8600e37c0c70d3b0771d18385eca3f961

Benni is working on a better solution to the problem.

Related: #55557
Change-Id: I749ea9beb3879d7503294a51107a4a3855f0105e
Reviewed-on: https://review.typo3.org/27319
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
---
 typo3/sysext/felogin/composer.json     |  3 +--
 typo3/sysext/felogin/ext_emconf.php    |  1 -
 typo3/sysext/felogin/ext_localconf.php | 27 +++++++++++++-------------
 3 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/typo3/sysext/felogin/composer.json b/typo3/sysext/felogin/composer.json
index b2ed43aab715..136810dafbe4 100644
--- a/typo3/sysext/felogin/composer.json
+++ b/typo3/sysext/felogin/composer.json
@@ -7,8 +7,7 @@
 	"version": "6.2.0",
 
 	"require": {
-		"typo3/cms/core": "*",
-		"typo3/cms/css-styled-content": "*"
+		"typo3/cms/core": "*"
 	},
 	"replace": {
 		"felogin": "*"
diff --git a/typo3/sysext/felogin/ext_emconf.php b/typo3/sysext/felogin/ext_emconf.php
index d5a09fba40cc..0e4c58253df3 100644
--- a/typo3/sysext/felogin/ext_emconf.php
+++ b/typo3/sysext/felogin/ext_emconf.php
@@ -31,7 +31,6 @@ $EM_CONF[$_EXTKEY] = array(
 	'constraints' => array(
 		'depends' => array(
 			'typo3' => '6.2.0-6.2.99',
-			'css_styled_content' => '6.2.0-6.2.99'
 		),
 		'conflicts' => array(),
 		'suggests' => array()
diff --git a/typo3/sysext/felogin/ext_localconf.php b/typo3/sysext/felogin/ext_localconf.php
index bbb68e9965d4..2cf371e8fb3a 100644
--- a/typo3/sysext/felogin/ext_localconf.php
+++ b/typo3/sysext/felogin/ext_localconf.php
@@ -2,17 +2,18 @@
 if (!defined('TYPO3_MODE')) {
 	die('Access denied.');
 }
-
-// define the plugin execution
-$pluginContent = '# Defining "felogin" plugin TypoScript
+//replace old Login
+$pluginContent = trim('
 plugin.tx_felogin_pi1 = USER_INT
-plugin.tx_felogin_pi1.userFunc = TYPO3\\CMS\\Felogin\\Controller\\FrontendLoginController->main
-';
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $pluginContent);
-
-// replace old Login with felogin
-$replaceLoginCType = '
-# Setting "felogin" plugin to replace default "login" content element via TypoScript
+plugin.tx_felogin_pi1 {
+  includeLibs = EXT:felogin/pi1/class.tx_felogin_pi1.php
+  userFunc = tx_felogin_pi1->main
+}
+');
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', '
+# Setting ' . $_EXTKEY . ' plugin TypoScript
+' . $pluginContent);
+$addLine = '
 tt_content.login = COA
 tt_content.login {
 	10 = < lib.stdheader
@@ -20,8 +21,7 @@ tt_content.login {
 	20 = < plugin.tx_felogin_pi1
 }
 ';
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $replaceLoginCType, 43);
-
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', '# Setting ' . $_EXTKEY . ' plugin TypoScript' . $addLine . '', 43);
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
 mod.wizards.newContentElement.wizardItems.forms {
 	elements {
@@ -39,4 +39,5 @@ mod.wizards.newContentElement.wizardItems.forms {
 ');
 
 // Page module hook
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'][$_EXTKEY] = 'TYPO3\\CMS\\Felogin\\Hooks\\CmsLayout';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'][$_EXTKEY] =
+	'EXT:' . $_EXTKEY . '/Classes/Hooks/CmsLayout.php:TYPO3\CMS\Felogin\Hooks\CmsLayout';
-- 
GitLab