[CLEANUP] Remove unused JS for pinging loginrefreshed 21/33921/2
authorBenjamin Mack <benni@typo3.org>
Sun, 9 Nov 2014 14:15:07 +0000 (15:15 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sun, 9 Nov 2014 14:25:30 +0000 (15:25 +0100)
There are still some leftover calls to save information
when the page was loaded at the latest. The whole
top.busy object does not exist in the core anymore
and can safely be removed.

Resolves: #62795
Releases: master
Change-Id: Ic5475470b86182bd8f6f4af05c05d8fa9e571f3f
Reviewed-on: http://review.typo3.org/33921
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Controller/LoginController.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.tbe_editor.js
typo3/sysext/core/Documentation/Changelog/master/Deprecation-62795-DocumentTemplateJavaScript.rst [new file with mode: 0644]

index 370a6ff..2c52076 100644 (file)
@@ -420,12 +420,8 @@ class LoginController {
                                $formProtection->setSessionTokenFromRegistry();
                                $formProtection->persistSessionToken();
                                $GLOBALS['TBE_TEMPLATE']->JScode .= $GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
-                                       if (parent.opener && (parent.opener.busy || parent.opener.TYPO3.loginRefresh)) {
-                                               if (parent.opener.TYPO3.loginRefresh) {
-                                                       parent.opener.TYPO3.loginRefresh.startTimer();
-                                               } else {
-                                                       parent.opener.busy.loginRefreshed();
-                                               }
+                                       if (parent.opener && parent.opener.TYPO3 && parent.opener.TYPO3.loginRefresh) {
+                                               parent.opener.TYPO3.loginRefresh.startTimer();
                                                parent.close();
                                        }
                                ');
index e2d0ef4..afebc4e 100644 (file)
@@ -165,6 +165,7 @@ function jumpToUrl(URL) {
         * If set, then a JavaScript section will be outputted in the bottom of page which will try and update the top.busy session expiry object.
         *
         * @var int
+        * @deprecated since TYPO3 CMS 7, will be removed in CMS 8
         */
        public $endJS = 1;
 
@@ -873,7 +874,7 @@ function jumpToUrl(URL) {
         * @see startPage()
         */
        public function endPage() {
-               $str = $this->sectionEnd() . $this->postCode . $this->endPageJS() . $this->wrapScriptTags(BackendUtility::getUpdateSignalCode()) . $this->parseTime() . ($this->form ? '
+               $str = $this->sectionEnd() . $this->postCode . $this->wrapScriptTags(BackendUtility::getUpdateSignalCode()) . $this->parseTime() . ($this->form ? '
 </form>' : '');
                // If something is in buffer like debug, put it to end of page
                if (ob_get_contents()) {
@@ -1058,13 +1059,10 @@ function jumpToUrl(URL) {
         * Further a JavaScript section is outputted which will update the top.busy session-expiry object (unless $this->endJS is set to FALSE)
         *
         * @return string HTML content (<script> tag section)
+        * @deprecated since TYPO3 CMS 7, will be removed in CMS 8, nothing there to output anymore
         */
        public function endPageJS() {
-               return $this->endJS ? $this->wrapScriptTags('
-               if (top.busy && top.busy.loginRefreshed) {
-                       top.busy.loginRefreshed();
-               }
-') : '';
+               return '';
        }
 
        /**
index d59d2fc..3e832fc 100644 (file)
@@ -319,7 +319,6 @@ var TBE_EDITOR = {
        loginRefreshed: function() {
                var date = new Date();
                TBE_EDITOR.loadTime = Math.floor(date.getTime()/1000);
-               if (top.busy && top.busy.loginRefreshed) { top.busy.loginRefreshed(); }
        },
        checkLoginTimeout: function() {
                var date = new Date();
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-62795-DocumentTemplateJavaScript.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-62795-DocumentTemplateJavaScript.rst
new file mode 100644 (file)
index 0000000..a10399a
--- /dev/null
@@ -0,0 +1,21 @@
+===================================================
+Deprecation: #62795 - DocumentTemplate->endPageJS()
+===================================================
+
+Description
+===========
+
+Method TYPO3\CMS\Backend\Template\DocumentTemplate::endPageJS() and the according property "endJS" is deprecated.
+
+
+Impact
+======
+
+None, as it isn't in use anymore since TYPO3 CMS 4.5 and was responsible for notifying the browser that the session
+is still active.
+
+
+Affected installations
+======================
+
+Installations misusing top.busy until now for their own good will break.
\ No newline at end of file