Project

General

Profile

Bug #20990 ยป 11869.diff

Administrator Admin, 2009-09-04 01:58

View differences:

typo3/index.php (working copy)
var $content; // Content accumulation
var $interfaceSelector; // A selector box for selecting value for "interface" may be rendered into this variable
var $interfaceSelector_jump; // A selector box for selecting value for "interface" may be rendered into this variable - this will have an onchange action which will redirect the user to the selected interface right away
var $interfaceSelector_hidden; // A hidden field, if the interface is not set.
var $addFields_hidden = ''; // Additional hidden fields to be placed at the login form
......
* This is drawn if a user login already exists.
*
* @return string HTML output
* deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5
*/
function makeLogoutForm() {
$content = t3lib_parsehtml::getSubpart($GLOBALS['TBE_TEMPLATE']->moduleTemplate, '###LOGOUT_FORM###');
......
// Reset variables:
$this->interfaceSelector = '';
$this->interfaceSelector_hidden='';
$this->interfaceSelector_jump = '';
// If interfaces are defined AND no input redirect URL in GET vars:
if ($TYPO3_CONF_VARS['BE']['interfaces'] && ($this->commandLI || !$this->redirect_url)) {
......
$labels['backend_old'] = $tempLabels[2];
$labels['frontend'] = $tempLabels[1];
$jumpScript=array();
$jumpScript['backend'] = 'backend.php';
$jumpScript['backend_old'] = 'alt_main.php';
$jumpScript['frontend'] = '../';
// Traverse the interface keys:
foreach($parts as $valueStr) {
$this->interfaceSelector.='
<option value="'.htmlspecialchars($valueStr).'"'.(t3lib_div::_GP('interface')==htmlspecialchars($valueStr) ? ' selected="selected"' : '').'>'.htmlspecialchars($labels[$valueStr]).'</option>';
$this->interfaceSelector_jump.='
<option value="'.htmlspecialchars($jumpScript[$valueStr]).'">'.htmlspecialchars($labels[$valueStr]).'</option>';
}
$this->interfaceSelector='
<select id="interfaceselector" name="interface" class="c-interfaceselector">'.$this->interfaceSelector.'
</select>';
$this->interfaceSelector_jump='
<select id="interfaceselector" name="interface" class="c-interfaceselector" onchange="window.location.href=this.options[this.selectedIndex].value;">'.$this->interfaceSelector_jump.'
</select>';
} else { // If there is only ONE interface value set:
    (1-1/1)