Bug #22440 » 20100413_RFC_14088.diff
typo3/css/install.css (revision 0) | ||
---|---|---|
@CHARSET "UTF-8";
|
||
/* Font size 62.8% = 1em = 10px */
|
||
body {
|
||
font: 62.8% Verdana, Arial, Helvetica, sans-serif;
|
||
background-color: #f2f2f2;
|
||
padding-top: 11em;
|
||
}
|
||
body.standalone {
|
||
background: #4f4f4f url('../gfx/installbackground.jpg') repeat-x fixed;
|
||
}
|
||
h1 {
|
||
display: none;
|
||
}
|
||
.standalone h1 {
|
||
background: url('../gfx/installlogo.gif') no-repeat scroll 0 0 transparent;
|
||
text-indent:-999em;
|
||
display: block;
|
||
height: 34px;
|
||
margin: 0 0 1.85em;
|
||
}
|
||
h2 {
|
||
margin-top: 0;
|
||
}
|
||
#container {
|
||
margin: 0 auto;
|
||
width: 39em;
|
||
font-size: 110%;
|
||
line-height: 1.5em;
|
||
}
|
||
.typo3-message {
|
||
padding: 0.6em 0.6em 0.6em 2.6em;
|
||
background-repeat: no-repeat;
|
||
background-position: 0.5em 0.7em;
|
||
border: 1px solid;
|
||
color: #000000;
|
||
}
|
||
.message-warning {
|
||
background-image: url("../gfx/warning.png");
|
||
background-color: #fbffb3;
|
||
border-color: #c4b70d;
|
||
}
|
typo3/install/index.php (working copy) | ||
---|---|---|
}
|
||
$PATH_thisScript = str_replace('//','/', str_replace('\\','/', (PHP_SAPI=='cgi'||PHP_SAPI=='isapi' ||PHP_SAPI=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME'])));
|
||
$PATH_site = dirname(dirname(dirname($PATH_thisScript)));
|
||
// Only allow Install Tool access if the file "typo3conf/ENABLE_INSTALL_TOOL" is found
|
||
$enableInstallToolFile = dirname(dirname(dirname($PATH_thisScript))).'/typo3conf/ENABLE_INSTALL_TOOL';
|
||
$enableInstallToolFile = $PATH_site . '/typo3conf/ENABLE_INSTALL_TOOL';
|
||
if (is_file($enableInstallToolFile) && (time() - filemtime($enableInstallToolFile) > 3600)) {
|
||
$content = file_get_contents($enableInstallToolFile);
|
||
... | ... | |
// Change 1==2 to 1==1 if you want to lock the Install Tool regardless of the file ENABLE_INSTALL_TOOL
|
||
if (1==2 || !is_file($enableInstallToolFile)) {
|
||
die(nl2br('<strong>The Install Tool is locked.</strong>
|
||
Fix: Create a file typo3conf/ENABLE_INSTALL_TOOL
|
||
This file may simply be empty.
|
||
For security reasons, it is highly recommended to rename
|
||
or delete the file after the operation is finished.
|
||
<strong>If the file is older than 1 hour TYPO3 has automatically
|
||
deleted it, so it needs to be created again.</strong>
|
||
'));
|
||
// Include t3lib_div and t3lib_parsehtml for templating
|
||
require_once($PATH_site . '/t3lib/class.t3lib_div.php');
|
||
require_once($PATH_site . '/t3lib/class.t3lib_parsehtml.php');
|
||
// Get the referer to define if this is called from backend or stand alone
|
||
$referer = parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
|
||
// Define body class when stand alone
|
||
if (!strpos($referer['path'], 'backend.php')) {
|
||
$bodyClass = 'class="standalone"';
|
||
}
|
||
// Define the stylesheet
|
||
$stylesheet = '<link rel="stylesheet" type="text/css" href="' .
|
||
'../css/install.css" />';
|
||
// Get the template file
|
||
$template = @file_get_contents($PATH_site . '/typo3/templates/install.html');
|
||
// Define the markers content
|
||
$markers = array(
|
||
'bodyClass' => $bodyClass,
|
||
'styleSheet' => $stylesheet,
|
||
'title' => 'The install tool is locked',
|
||
'content' => '
|
||
<p>
|
||
Fix: Create a file named <strong>ENABLE_INSTALL_TOOL</strong>
|
||
and put it into the folder <strong>typo3conf/</strong>
|
||
<br />
|
||
This file may simply be empty.
|
||
</p>
|
||
<p>
|
||
For security reasons, it is highly recommended to rename or
|
||
delete the file after the operation is finished.
|
||
</p>
|
||
<p>
|
||
If the file is older than 1 hour TYPO3 has automatically deleted
|
||
it, so it needs to be created again.
|
||
</p>
|
||
'
|
||
);
|
||
// Fill the markers
|
||
$content = t3lib_parsehtml::substituteMarkerArray(
|
||
$template,
|
||
$markers,
|
||
'###|###',
|
||
1,
|
||
1
|
||
);
|
||
// Output the warning message and exit
|
||
header('Content-Type: text/html; charset=utf-8');
|
||
echo $content;
|
||
exit();
|
||
}
|
||
typo3/templates/install.html (revision 0) | ||
---|---|---|
<?xml version="1.0" encoding="###CHARSET###"?>
|
||
<!DOCTYPE html
|
||
PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<title>###TITLE###</title>
|
||
###STYLESHEET###
|
||
</head>
|
||
<body ###BODYCLASS###>
|
||
<div id="container">
|
||
<h1>TYPO3</h1>
|
||
<div class="typo3-message message-warning">
|
||
<h2>###TITLE###</h2>
|
||
###CONTENT###
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|