Index: typo3/css/install.css =================================================================== --- typo3/css/install.css (revision 0) +++ typo3/css/install.css (revision 0) @@ -0,0 +1,49 @@ +@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; +} \ No newline at end of file Index: typo3/gfx/installbackground.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: typo3\gfx\installbackground.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: typo3/gfx/installlogo.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: typo3\gfx\installlogo.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: typo3/install/index.php =================================================================== --- typo3/install/index.php (revision 7304) +++ typo3/install/index.php (working copy) @@ -47,9 +47,10 @@ } $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); @@ -63,17 +64,54 @@ // 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('The Install Tool is locked. - - 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. - - If the file is older than 1 hour TYPO3 has automatically - deleted it, so it needs to be created again. - ')); + // 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 = ''; + // 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' => ' +

+ Fix: Create a file named ENABLE_INSTALL_TOOL + and put it into the folder typo3conf/ +
+ This file may simply be empty. +

+

+ For security reasons, it is highly recommended to rename or + delete the file after the operation is finished. +

+

+ If the file is older than 1 hour TYPO3 has automatically deleted + it, so it needs to be created again. +

+ ' + ); + // 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(); } Index: typo3/templates/install.html =================================================================== --- typo3/templates/install.html (revision 0) +++ typo3/templates/install.html (revision 0) @@ -0,0 +1,21 @@ + + + + + + + ###TITLE### + ###STYLESHEET### + + +
+

TYPO3

+
+

###TITLE###

+ ###CONTENT### +
+
+ + \ No newline at end of file