[TASK] Make login_frameset.php dispatched 22/36622/5
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 2 Feb 2015 22:49:40 +0000 (23:49 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Wed, 4 Feb 2015 19:03:50 +0000 (20:03 +0100)
Use dispatching for login_frameset.php

Resolves: #64774
Releases: master
Change-Id: I1ce9794f3b7a7d66e20bca84464fb9d1cd48c759
Reviewed-on: http://review.typo3.org/36622
Reviewed-by: Benjamin Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/login_frameset.php
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Modules/LoginFrameset/conf.php [new file with mode: 0644]
typo3/sysext/backend/Modules/LoginFrameset/index.php [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/LoginRefresh.js
typo3/sysext/backend/ext_tables.php

index 0c2f091..473c30a 100644 (file)
 define('TYPO3_PROCEED_IF_NO_USER', 1);
 require __DIR__ . '/init.php';
 
 define('TYPO3_PROCEED_IF_NO_USER', 1);
 require __DIR__ . '/init.php';
 
+\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
+       'Login frameset is moved to an own module. Please use BackendUtility::getModuleUrl(\'login_frameset\') to link to login_frameset.php. This script will be removed in TYPO3 CMS 8.'
+);
+
 // Make instance:
 $loginFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LoginFramesetController::class);
 $loginFramesetController->main();
 // Make instance:
 $loginFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LoginFramesetController::class);
 $loginFramesetController->main();
index 71b898d..8dd1a57 100644 (file)
@@ -128,7 +128,9 @@ class BackendController {
                        'util' => 'sysext/backend/Resources/Public/JavaScript/util.js'
                );
                if (!$this->debug) {
                        'util' => 'sysext/backend/Resources/Public/JavaScript/util.js'
                );
                if (!$this->debug) {
-                       $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LoginRefresh');
+                       $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LoginRefresh', 'function(LoginRefresh) {
+                               LoginRefresh.setLoginFramesetUrl(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('login_frameset')) . ');
+                       }');
                }
 
                // load FlashMessages functionality
                }
 
                // load FlashMessages functionality
diff --git a/typo3/sysext/backend/Modules/LoginFrameset/conf.php b/typo3/sysext/backend/Modules/LoginFrameset/conf.php
new file mode 100644 (file)
index 0000000..cbb709a
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+$MCONF['script'] = '_DISPATCH';
+$MCONF['name'] = 'login_frameset';
\ No newline at end of file
diff --git a/typo3/sysext/backend/Modules/LoginFrameset/index.php b/typo3/sysext/backend/Modules/LoginFrameset/index.php
new file mode 100644 (file)
index 0000000..ac0d2b8
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Login frameset
+ *
+ * This script generates a login-frameset used when the user must relogin.
+ *
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
+ */
+define('TYPO3_PROCEED_IF_NO_USER', 1);
+
+$loginFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LoginFramesetController::class);
+$loginFramesetController->main();
+$loginFramesetController->printContent();
\ No newline at end of file
index bfc2c68..12fb18c 100644 (file)
@@ -33,7 +33,8 @@ define('TYPO3/CMS/Backend/LoginRefresh', ['jquery'], function($) {
                isTimingOut: false,
                $timeoutModal: '',
                $backendLockedModal: '',
                isTimingOut: false,
                $timeoutModal: '',
                $backendLockedModal: '',
-               $loginForm: ''
+               $loginForm: '',
+               loginFramesetUrl: ''
        };
 
        /**
        };
 
        /**
@@ -226,10 +227,17 @@ define('TYPO3/CMS/Backend/LoginRefresh', ['jquery'], function($) {
        };
 
        /**
        };
 
        /**
+        * Set login frameset url
+        */
+       LoginRefresh.setLoginFramesetUrl = function(loginFramesetUrl) {
+               LoginRefresh.loginFramesetUrl = loginFramesetUrl;
+       };
+
+       /**
         * Opens the login form in a new window.
         */
        LoginRefresh.showLoginPopup = function() {
         * Opens the login form in a new window.
         */
        LoginRefresh.showLoginPopup = function() {
-               var vHWin = window.open('login_frameset.php', 'relogin_' + TYPO3.configuration.uniqueID, 'height=450,width=700,status=0,menubar=0,location=1');
+               var vHWin = window.open(LoginRefresh.loginFramesetUrl, 'relogin_' + TYPO3.configuration.uniqueID, 'height=450,width=700,status=0,menubar=0,location=1');
                vHWin.focus();
        };
 
                vHWin.focus();
        };
 
index c21bb5c..1b78a19 100644 (file)
@@ -8,6 +8,12 @@ if (TYPO3_MODE === 'BE') {
                \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/RecordHistory/'
        );
 
                \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/RecordHistory/'
        );
 
+       // Register login frameset
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
+               'login_frameset',
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/LoginFrameset/'
+       );
+
        // Register file_edit
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
                'file_edit',
        // Register file_edit
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
                'file_edit',