Project

General

Profile

Bug #22633 ยป 14365.diff

Administrator Admin, 2010-05-11 20:11

View differences:

typo3/sysext/install/mod/class.tx_install.php (working copy)
function loginForm() {
$password = t3lib_div::_GP('password');
$redirect_url = $this->redirect_url ? $this->redirect_url : $this->action;
// Add prototype to javascript array for output
$this->javascript[] = '<script type="text/javascript" src="' .
t3lib_div::createVersionNumberedFilename(
'../contrib/prototype/prototype.js'
) . '"></script>';
// Get the template file
$templateFile = @file_get_contents(
PATH_site . $this->templateFilePath . 'LoginForm.html'
......
if ($this->step) {
$this->output($this->outputWrapper($this->stepOutput()));
} else {
// Menu...
switch($this->INSTALL['type']) {
case 'images':
......
);
if ($this->mode!='123') {
$this->javascript[] = '<script type="text/javascript" src="' .
t3lib_div::createVersionNumberedFilename(
'../contrib/prototype/prototype.js'
) . '"></script>';
$this->javascript[] = '<script type="text/javascript" src="' .
t3lib_div::createVersionNumberedFilename(
'../sysext/install/Resources/Public/Javascript/install.js'
) . '"></script>';
// Get the subpart for the regular mode
$regularModeSubpart = t3lib_parsehtml::getSubpart($form, '###REGULARMODE###');
// Define the markers content
......
* @return void
*/
function checkTheDatabase() {
$this->javascript[] = '<script type="text/javascript" src="' .
t3lib_div::createVersionNumberedFilename(
'../contrib/prototype/prototype.js'
) . '"></script>';
if (!$this->config_array['mysqlConnect']) {
$this->message('Database Analyser', 'Your database connection failed', '
<p>
......
$this->template = @file_get_contents(PATH_site . $this->templateFilePath . 'Install.html');
}
// Add prototype to javascript array for output
$this->javascript[] = '<script type="text/javascript" src="' .
t3lib_div::createVersionNumberedFilename(
'../contrib/prototype/prototype.js'
) . '"></script>';
// Add JS functions for output
$this->javascript[] = '<script type="text/javascript" src="' .
t3lib_div::createVersionNumberedFilename(
'../sysext/install/Resources/Public/Javascript/install.js'
) . '"></script>';
// Include the default stylesheets
$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
t3lib_div::createVersionNumberedFilename($this->backPath .
......
t3lib_div::createVersionNumberedFilename($this->backPath .
'sysext/install/Resources/Public/Stylesheets/install.css'
) . '" />';
if (!$this->session->inBackend()) {
$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
t3lib_div::createVersionNumberedFilename($this->backPath .
'sysext/install/Resources/Public/Stylesheets/install_standalone.css'
) . '" />';
}
} else {
} else {
$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
t3lib_div::createVersionNumberedFilename($this->backPath .
'sysext/install/Resources/Public/Stylesheets/install.css'
) . '" />';
$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
t3lib_div::createVersionNumberedFilename($this->backPath .
'sysext/install/Resources/Public/Stylesheets/install_login.css'
) . '" />';
if (!$this->session->inBackend()) {
$this->stylesheets[] = '<link rel="stylesheet" type="text/css" href="' .
t3lib_div::createVersionNumberedFilename($this->backPath .
'sysext/install/Resources/Public/Stylesheets/install_standalone.css'
) . '" />';
}
}
// Include javascript message
typo3/sysext/install/mod/class.tx_install_session.php (working copy)
public function startSession() {
$_SESSION['created'] = time();
$referer = parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
if (strpos($referer['path'], $this->backendFile)) {
$_SESSION['backend'] = TRUE;
} else {
$_SESSION['backend'] = FALSE;
}
return session_id();
}
......
}
/**
* Check if the install tool is called in the backend
*
* @return boolean True if the install tool has been called from the backend
*/
public function inBackend() {
if ($_SESSION['backend']) {
return TRUE;
}
return FALSE;
}
/**
* Refreshes our session information, rising the expire time.
* Also generates a new session ID every 5 minutes to minimize the risk of
* session hijacking.
typo3/sysext/install/Resources/Public/Javascript/install.js (working copy)
/***************************************************************
*
* Javascript functions to provide AJAX calls for install tool
* Various JavaScript functions for the Install Tool
*
* Copyright notice
*
* (c) 2009 Marcus Krause, Helmut Hummel <security@typo3.org>
* (c) 2009-2010 Marcus Krause, Helmut Hummel, Lars Houmark
* All rights reserved
*
* This script is part of the TYPO3 backend provided by
......
/**
* Javascript class to provide AJAX calls for Install Tool
*
* @author Marcus Krause
* @author Marcus Krause, Helmut Hummel <security@typo3.org>
*/
var EncryptionKey = {
thisScript: '../../index.php',
......
});
}
};
/**
* Prototype method to detect if the Install Tool is loaded
* in the backend or as a standalone.
*
* If it standalone, a class is added to the body tag in order
* to different the CSS style for that version.
*
* @author Lars Houmark <lars@houmark.com>
*/
document.observe("dom:loaded", function() {
if (top.location === document.location) {
// standalone-mode, add class to the body tag
document.body.addClassName('standalone');
}
});
typo3/sysext/install/Resources/Public/Stylesheets/install_standalone.css (working copy)
@CHARSET "UTF-8";
body {
background: #4f4f4f url('../Images/body-background.jpg') repeat-x fixed;
}
#t3-install-outer {
margin: 0 auto;
}
h1,
#t3-install-menu-border-top,
#t3-install-menu-bottom,
#t3-install-links,
#t3-install-box-border-top,
#t3-install-box-border-bottom,
#t3-install-copyright {
display: block;
}
h1 {
background: url('../Images/logo.gif') no-repeat scroll 0 0 transparent;
text-indent:-999em;
margin: 2em 0 3.7em 0;
height: 34px;
width: 19em;
float: left;
}
h2 {
padding: 3.3em 0 3.7em 17.5em;
margin: 0;
height: auto;
color: #ffffff;
}
#t3-install-box-border-top {
height: 3px;
background: #3e3e3e url('../Images/content-top.png') no-repeat center bottom;
}
#t3-install-box-body {
background-color: #eeeeee;
}
#t3-install-box-border-bottom {
height: 3px;
background: #4d4c4d url('../Images/content-bottom.png') no-repeat center top;
}
#t3-install-menu,
#t3-install-box-body {
border: 0;
}
#t3-install-menu-border-top {
width: 17.6em;
height: 3px;
background: #3e3e3e url('../Images/content-top.png') no-repeat center bottom;
}
#t3-install-menu {
background: #ebebeb url('../Images/menuBackground.gif') repeat-x left bottom;
}
#t3-install-menu-bottom {
width: 17.6em;
height: 3px;
background: #3e3e3e url('../Images/content-top.png') no-repeat center bottom;
}
typo3/sysext/install/Resources/Public/Stylesheets/install.css (working copy)
padding: 0;
}
/* 10: About */
/* 10: About */
/* Stylesheet for the standalone version of the Install Tool */
body.standalone {
background: #4f4f4f url('../Images/body-background.jpg') repeat-x fixed;
}
body.standalone #t3-install-outer {
margin: 0 auto;
}
body.standalone h1,
body.standalone #t3-install-menu-border-top,
body.standalone #t3-install-menu-bottom,
body.standalone #t3-install-links,
body.standalone #t3-install-box-border-top,
body.standalone #t3-install-box-border-bottom,
body.standalone #t3-install-copyright {
display: block;
}
body.standalone h1 {
background: url('../Images/logo.gif') no-repeat scroll 0 0 transparent;
text-indent:-999em;
margin: 2em 0 3.7em 0;
height: 34px;
width: 19em;
float: left;
}
body.standalone h2 {
padding: 3.3em 0 3.7em 17.5em;
margin: 0;
height: auto;
color: #ffffff;
}
body.standalone #t3-install-box-border-top {
height: 3px;
background: #3e3e3e url('../Images/content-top.png') no-repeat center bottom;
}
body.standalone #t3-install-box-body {
background-color: #eeeeee;
}
body.standalone #t3-install-box-border-bottom {
height: 3px;
background: #4d4c4d url('../Images/content-bottom.png') no-repeat center top;
}
body.standalone #t3-install-menu,
body.standalone #t3-install-box-body {
border: 0;
}
body.standalone #t3-install-menu-border-top {
width: 17.6em;
height: 3px;
background: #3e3e3e url('../Images/content-top.png') no-repeat center bottom;
}
body.standalone #t3-install-menu {
background: #ebebeb url('../Images/menuBackground.gif') repeat-x left bottom;
}
body.standalone #t3-install-menu-bottom {
width: 17.6em;
height: 3px;
background: #3e3e3e url('../Images/content-top.png') no-repeat center bottom;
}
body.standalone .t3-install-login h2 {
clear: both;
margin: 0;
padding: 0.5em 0 0.5em 3.35em;
}
    (1-1/1)