Index: typo3/sysext/install/ext_localconf.php
===================================================================
--- typo3/sysext/install/ext_localconf.php (revision 5014)
+++ typo3/sysext/install/ext_localconf.php (working copy)
@@ -17,6 +17,6 @@
// change tt_content.imagecols=0 to 1 for proper display in TCEforms since TYPO3 4.3
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['update']['changeImagecolsValue'] = 'tx_coreupdates_imagecols';
- // register eID script for ecryption key AJAX call
-$TYPO3_CONF_VARS['FE']['eID_include']['tx_install_eid'] = 'EXT:install/mod/class.tx_install_eid.php';
+ // register eID script for install tool AJAX calls
+$TYPO3_CONF_VARS['FE']['eID_include']['tx_install_ajax'] = 'EXT:install/mod/class.tx_install_ajax.php';
?>
Index: typo3/sysext/install/mod/class.tx_install.php
===================================================================
--- typo3/sysext/install/mod/class.tx_install.php (revision 5014)
+++ typo3/sysext/install/mod/class.tx_install.php (working copy)
@@ -2086,10 +2086,13 @@
$out.=$this->wrapInCells('', '
');
if ($this->mode!='123') {
+ $this->headerStyle .= chr(10) .
+ '
+ ';
+
+
$out.=$this->wrapInCells('Site name:', '');
$out.=$this->wrapInCells('', '
');
- $out.='';
- $out.='';
$out.=$this->wrapInCells('Encryption key:', '
');
$out.=$this->wrapInCells('', '
');
Index: typo3/sysext/install/mod/class.tx_install_ajax.php
===================================================================
--- typo3/sysext/install/mod/class.tx_install_ajax.php (revision 0)
+++ typo3/sysext/install/mod/class.tx_install_ajax.php (revision 0)
@@ -0,0 +1,133 @@
+
+ */
+class tx_install_ajax {
+
+
+ /**
+ * Keeps content to be printed.
+ *
+ * @var string
+ */
+ var $content;
+
+ /**
+ * Keeps command to process.
+ *
+ * @var string
+ */
+ var $cmd = '';
+
+
+ /**
+ * Init function, setting the input vars in the class scope.
+ *
+ * @return void
+ */
+ function init() {
+ $this->cmd = t3lib_div::_GP('cmd');
+ }
+
+ /**
+ * Main function which creates the AJAX call return string.
+ * It is stored in $this->content.
+ *
+ * @return void
+ */
+ function main() {
+ // Create output:
+ switch ($this->cmd) {
+ case 'encryptionKey':
+ default:
+ $this->content = $this->createEncryptionKey();
+ break;
+ }
+ }
+
+ /**
+ * Outputs the content from $this->content
+ *
+ * @return void
+ */
+ function printContent() {
+ echo $this->content;
+ }
+
+ /**
+ * Returns a newly created TYPO3 encryption key with a given length.
+ *
+ * @param integer $keyLength desired key length
+ * @return string
+ */
+ function createEncryptionKey($keyLength = 96) {
+
+ $bytes = t3lib_div::generateRandomBytes($keyLength);
+ return substr(bin2hex($bytes), -96);
+ }
+}
+
+// Make instance:
+$SOBE = t3lib_div::makeInstance('tx_install_ajax');
+$SOBE->init();
+$SOBE->main();
+$SOBE->printContent();
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/sysext/install/mod/class.tx_install_ajax.php']) {
+ include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/sysext/install/mod/class.tx_install_ajax.php']);
+}
+?>
Index: typo3/sysext/install/mod/install.js
===================================================================
--- typo3/sysext/install/mod/install.js (revision 0)
+++ typo3/sysext/install/mod/install.js (revision 0)
@@ -0,0 +1,49 @@
+/***************************************************************
+*
+* Javascript functions to provide AJAX calls for install tool
+*
+* Copyright notice
+*
+* (c) 2009 Marcus Krause, Helmut Hummel
+* All rights reserved
+*
+* This script is part of the TYPO3 backend provided by
+* Kasper Skaarhoj together with TYPO3
+*
+* Released under GNU/GPL (see license file in /typo3/)
+*
+* This script is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*
+* This copyright notice MUST APPEAR in all copies of this script
+*
+***************************************************************/
+
+
+/**
+ *
+ * @author Marcus Krause
+ */
+var EncryptionKey = {
+ thisScript: '../../index.php',
+ eID: 'tx_install_ajax',
+ cmd: 'encryptionKey',
+
+ // loads the ecryption key by an AJAX call
+ load: function(obj) {
+ // fallback if AJAX is not possible (e.g. IE < 6)
+ if (typeof Ajax.getTransport() != 'object') {
+ window.location.href = this.thisScript + '?eID=' + this.eID + '&cmd=' + this.cmd;
+ return;
+ }
+
+ new Ajax.Request(this.thisScript, {
+ method: 'get',
+ parameters: '?eID=' + this.eID + '&cmd=' + this.cmd,
+ onComplete: function(xhr) {
+ document.getElementsByName('TYPO3_INSTALL[localconf.php][encryptionKey]').item(0).value=xhr.responseText;
+ }.bind(this)
+ });
+ }
+};