Fixed bug #11013: Generate Random Key still does not work (thanks to Marcus Krause)
authorRupert Germann <rupi@gmx.li>
Sat, 19 Sep 2009 18:30:29 +0000 (18:30 +0000)
committerRupert Germann <rupi@gmx.li>
Sat, 19 Sep 2009 18:30:29 +0000 (18:30 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5995 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/install/ext_emconf.php
typo3/sysext/install/mod/class.tx_install_ajax.php

index 849d5a9..079e6b2 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@
        * Fixed bug #11917: TCEforms suggest fails with empty label or label_alt field (thanks to Andreas Wolf)
        * Fixed bug #11988: Extension Manager is not translatable (part 6) (thanks to Christopher Stelmaszyk)
        * Fixed bug #11986: dynamic update of translation status im EM is broken
+       * Fixed bug #11013: Generate Random Key still does not work (thanks to Marcus Krause)
 
 2009-09-18  Sebastian Kurfuerst  <sebastian@typo3.org>
 
index b14eff1..31ddef4 100755 (executable)
@@ -20,7 +20,6 @@ $EM_CONF[$_EXTKEY] = array(
        'priority' => '',
        'loadOrder' => '',
        'module' => 'mod',
-       'doNotLoadInFE' => 1,
        'state' => 'stable',
        'internal' => 0,
        'uploadfolder' => 0,
index 2c35e08..64454d2 100644 (file)
@@ -95,6 +95,7 @@ class tx_install_ajax {
                        case 'encryptionKey':
                        default:
                                $this->content = $this->createEncryptionKey();
+                               $this->addTempContentHttpHeaders();
                                break;
                }
        }
@@ -105,6 +106,9 @@ class tx_install_ajax {
         * @return      void
         */
        function printContent() {
+               if (!headers_sent()) {
+                       header('Content-Length: ' . strlen($this->content));
+               }
                echo $this->content;
        }
 
@@ -115,10 +119,28 @@ class tx_install_ajax {
         * @return string
         */
        function createEncryptionKey($keyLength = 96) {
+               if (!headers_sent()) {
+                       header("Content-type: text/plain");
+               }
 
                $bytes = t3lib_div::generateRandomBytes($keyLength);
                return substr(bin2hex($bytes), -96);
        }
+
+       /**
+        * Sends cache control headers that prevent caching in user agents.
+        *
+        */
+       function addTempContentHttpHeaders() {
+               if (!headers_sent()) {
+                               // see RFC 2616
+                               // see Microsoft Knowledge Base #234067
+                       header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
+                       header('Cache-Control: no-cache, must-revalidate');
+                       header('Pragma: no-cache');
+                       header('Expires: -1');
+               }
+       }
 }
 
 // Make instance: