Project

General

Profile

Bug #20379 » 11013_v3.diff

Administrator Admin, 2009-09-19 20:24

View differences:

typo3/sysext/install/mod/class.tx_install_ajax.php (Arbeitskopie)
case 'encryptionKey':
default:
$this->content = $this->createEncryptionKey();
$this->addTempContentHttpHeaders();
break;
}
}
......
* @return void
*/
function printContent() {
if (!headers_sent()) {
header('Content-Length: ' . strlen($this->content));
}
echo $this->content;
}
......
* @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:
typo3/sysext/install/ext_emconf.php (Arbeitskopie)
'priority' => '',
'loadOrder' => '',
'module' => 'mod',
'doNotLoadInFE' => 1,
'state' => 'stable',
'internal' => 0,
'uploadfolder' => 0,
(3-3/3)