Index: t3lib/class.t3lib_timetrack.php =================================================================== --- t3lib/class.t3lib_timetrack.php (revision 9908) +++ t3lib/class.t3lib_timetrack.php (working copy) @@ -90,9 +90,6 @@ 'flag_content' => 0, 'allTime' => 0, 'keyLgd' => 40, - 'factor' => 10, - 'col' => '#D9D5C9', - 'highlight_col' => '#FF9933' ); var $wrapError = array(); @@ -307,7 +304,9 @@ $data['endtime'] = $this->getDifferenceToStarttime($data['endtime']); $data['starttime'] = $this->getDifferenceToStarttime($data['starttime']); $data['deltatime'] = $data['endtime'] - $data['starttime']; - $data['key'] = implode($data['stackPointer'] ? '.' : '/', end($data['tsStack'])); + if (is_array($data['tsStack'])) { + $data['key'] = implode($data['stackPointer'] ? '.' : '/', end($data['tsStack'])); + } } // Create hierarchical array of keys pointing to the stack @@ -337,7 +336,7 @@ $out = ''; foreach ($outputArr as $row) { $out .= ' - ' . $row . ''; + ' . $row . ''; } $out = '' . $out . ''; @@ -352,9 +351,10 @@ $c = 0; foreach ($this->tsStackLog as $uniqueId => $data) { - $bgColor = ' background-color:' . ($c % 2 ? t3lib_div::modifyHTMLColor($col, $factor, $factor, $factor) : $col) . ';'; if ($this->highlightLongerThan && intval($data['owntime']) > intval($this->highlightLongerThan)) { - $bgColor = ' background-color:' . $highlight_col . ';'; + $logRowClass = 'typo3-adminPanel-logRow-highlight'; + } else { + $logRowClass = ($c % 2) ? 'typo3-adminPanel-logRow-odd' : 'typo3-adminPanel-logRow-even'; } $item = ''; @@ -386,21 +386,21 @@ $theLabel = $data['key']; } $theLabel = t3lib_div::fixed_lgd_cs($theLabel, -$keyLgd); - $theLabel = $data['stackPointer'] ? '' . $theLabel . '' : $theLabel; + $theLabel = $data['stackPointer'] ? '' . $theLabel . '' : $theLabel; $keyLabel = $theLabel . $keyLabel; - $item .= '' . ($flag_tree ? $data['icons'] : '') . $this->fw($keyLabel) . ''; + $item .= '' . ($flag_tree ? $data['icons'] : '') . $this->fw($keyLabel) . ''; // key value: $keyValue = $data['value']; - $item .= '' . $this->fw(htmlspecialchars($keyValue)) . ''; + $item .= '' . $this->fw(htmlspecialchars($keyValue)) . ''; if ($this->printConf['allTime']) { - $item .= ' ' . $this->fw($data['starttime']) . ''; - $item .= ' ' . $this->fw($data['owntime']) . ''; - $item .= ' ' . $this->fw($data['subtime'] ? '+' . $data['subtime'] : '') . ''; - $item .= ' ' . $this->fw($data['subtime'] ? '=' . $data['deltatime'] : '') . ''; + $item .= ' ' . $this->fw($data['starttime']) . ''; + $item .= ' ' . $this->fw($data['owntime']) . ''; + $item .= ' ' . $this->fw($data['subtime'] ? '+' . $data['subtime'] : '') . ''; + $item .= ' ' . $this->fw($data['subtime'] ? '=' . $data['deltatime'] : '') . ''; } else { - $item .= ' ' . $this->fw($data['owntime']) . ''; + $item .= ' ' . $this->fw($data['owntime']) . ''; } @@ -428,11 +428,11 @@ if (count($msgArr)) { $msg = implode($msgArr, '
'); } - $item .= '' . $this->fw($msg) . ''; + $item .= '' . $this->fw($msg) . ''; $out .= '' . $item . ''; $c++; } - $out = '' . $out . '
'; + $out = '' . $out . '
'; return $out; } Index: t3lib/js/adminpanel.js =================================================================== --- t3lib/js/adminpanel.js (revision 9908) +++ t3lib/js/adminpanel.js (working copy) @@ -5,7 +5,7 @@ * * Copyright notice * - * (c) 2009-2010 Ingo Renner + * (c) 2010 Dmitry Dulepov * All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is @@ -26,58 +26,64 @@ ***************************************************************/ /** - * @author Ingo Renner - * @author Oliver Hader - * @author Ingmar Schlecht - * @author Jonas Dübi + * @author Dmitry Dulepov */ -var TYPO3AdminPanel = { +var TYPO3AdminPanel = function() { + this.boxElement = null; + this.dragging = false; + this.dragElement = document; + this.previousMouseUpHandler = null; + this.previousMouseMoveHandler = null; + this.mouseOffset = { + x: 0, + y: 0 + }; +} - positionRestored: false, - dragObject: null, - dragX: 0, - dragY: 0, - posX: 0, - posY: 0, +TYPO3AdminPanel.prototype = { - savePosition: function(panel) { - var admPanelPosX = panel.offsetLeft; - var admPanelPosY = panel.offsetTop; - - TYPO3AdminPanel.setCookie('admPanelPosX', admPanelPosX, '', '/'); - TYPO3AdminPanel.setCookie('admPanelPosY', admPanelPosY, '', '/'); + init: function(headerElementId, boxElementId) { + this.boxElement = document.getElementById(boxElementId); + this.setInitialPosition(); + this.setMouseDownHandler(headerElementId); }, - restorePosition: function() { - if (TYPO3AdminPanel.positionRestored == false) { - - var admPanelPosX = TYPO3AdminPanel.getCookie('admPanelPosX'); - if (admPanelPosX > 0) { - document.getElementById('admPanel').style.left = admPanelPosX + 'px'; + dragStart: function(event) { + if (!this.dragging) { + if (!event) { + event = window.event; } + this.dragging = true; + this.setMouseOffsets(event); + this.setDragHandlers(); + } + }, - var admPanelPosY = TYPO3AdminPanel.getCookie('admPanelPosY'); - if (admPanelPosY > 0) { - document.getElementById('admPanel').style.top = admPanelPosY + 'px'; - } - - TYPO3AdminPanel.positionRestored = true; + dragEnd: function() { + if (this.dragging) { + this.dragging = false; + this.dragElement.onmouseup = this.previousMouseUpHandler; + this.dragElement.onmousemove = this.previousMouseMoveHandler; + this.setCookie("admPanelPosX", this.boxElement.style.left); + this.setCookie("admPanelPosY", this.boxElement.style.top); } }, - setCookie: function(name, value, expires, path, domain, secure) { - document.cookie = name + '=' + escape(value) - + (expires ? '; expires=' + expires.toGMTString() : '') - + (path ? '; path=' + path : '') - + (domain ? '; domain=' + domain : '') - + (secure ? '; secure' : ''); + drag: function(event) { + if (this.dragging) { + if (!event) { + event = window.event; + } + this.boxElement.style.left = (event.clientX + this.mouseOffset.x) + "px"; + this.boxElement.style.top = (event.clientY + this.mouseOffset.y) + "px"; + } }, getCookie: function(name) { var dc = document.cookie; - var prefix = name + '='; - var begin = dc.indexOf('; ' + prefix); + var prefix = name + "="; + var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); @@ -88,7 +94,7 @@ begin += 2; } - var end = dc.indexOf(';', begin); + var end = dc.indexOf(";", begin); if (end == -1) { end = dc.length; } @@ -96,28 +102,46 @@ return unescape(dc.substring(begin + prefix.length, end)); }, - dragInit: function() { - document.onmousemove = TYPO3AdminPanel.drag; - document.onmouseup = TYPO3AdminPanel.dragStop; + setCookie: function(name, value) { + document.cookie = name + "=" + escape(value); }, - dragStart: function(element) { - TYPO3AdminPanel.dragObject = element; - TYPO3AdminPanel.dragX = TYPO3AdminPanel.posX - TYPO3AdminPanel.dragObject.offsetLeft; - TYPO3AdminPanel.dragY = TYPO3AdminPanel.posY - TYPO3AdminPanel.dragObject.offsetTop; + setDragHandlers: function() { + var _this = this; + + this.previousMouseUpHandler = this.dragElement.onmouseup; + this.dragElement.onmouseup = function() { + _this.dragEnd.apply(_this, arguments); + } + this.previousMouseMoveHandler = this.dragElement.onmousemove; + this.dragElement.onmousemove = function() { + _this.drag.apply(_this, arguments); + } }, - dragStop: function() { - TYPO3AdminPanel.dragObject = null; + setInitialPosition: function() { + this.boxElement.style.position = "absolute"; + + var pos = this.getCookie("admPanelPosX"); + if (pos) { + this.boxElement.style.left = pos; + } + pos = this.getCookie("admPanelPosY"); + if (pos) { + this.boxElement.style.top = pos; + } }, - drag: function(dragEvent) { - TYPO3AdminPanel.posX = document.all ? window.event.clientX : dragEvent.pageX; - TYPO3AdminPanel.posY = document.all ? window.event.clientY : dragEvent.pageY; + setMouseDownHandler: function(headerElementId) { + var _this = this, headerElement = document.getElementById(headerElementId); + headerElement.onmousedown = function() { + _this.dragStart.apply(_this, arguments); + } + }, - if (TYPO3AdminPanel.dragObject != null) { - TYPO3AdminPanel.dragObject.style.left = (TYPO3AdminPanel.posX - TYPO3AdminPanel.dragX) + 'px'; - TYPO3AdminPanel.dragObject.style.top = (TYPO3AdminPanel.posY - TYPO3AdminPanel.dragY) + 'px'; - } + setMouseOffsets: function(event) { + this.mouseOffset.x = this.boxElement.offsetLeft - event.clientX; + this.mouseOffset.y = this.boxElement.offsetTop - event.clientY; } + }; Index: typo3/sysext/t3skin/ext_tables.php =================================================================== --- typo3/sysext/t3skin/ext_tables.php (revision 9908) +++ typo3/sysext/t3skin/ext_tables.php (working copy) @@ -1,7 +1,7 @@ isFrontendEditingActive())) { +if (TYPO3_MODE == 'BE' || (TYPO3_MODE == 'FE' && isset($GLOBALS['BE_USER']))) { global $TBE_STYLES; // register as a skin @@ -179,6 +179,8 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preHeaderRenderHook'][] = t3lib_extMgm::extPath('t3skin').'pngfix/class.tx_templatehook.php:tx_templatehook->registerPngFix'; + $GLOBALS['TBE_STYLES']['stylesheets']['admPanel'] = t3lib_extMgm::siteRelPath('t3skin') . 'stylesheets/visual/admin_panel.css'; + t3lib_SpriteManager::addIconSprite( array( 'flags-ad', Index: typo3/sysext/t3skin/images/arrows/adminpanel-down.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: typo3/sysext/t3skin/images/arrows/adminpanel-down.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: typo3/sysext/t3skin/images/arrows/module-menu-right-alt.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: typo3/sysext/t3skin/images/arrows/module-menu-right-alt.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: typo3/sysext/t3skin/images/arrows/adminpanel-up.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: typo3/sysext/t3skin/images/arrows/adminpanel-up.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: typo3/sysext/t3skin/images/arrows/module-menu-down-alt.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: typo3/sysext/t3skin/images/arrows/module-menu-down-alt.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: typo3/sysext/t3skin/stylesheets/visual/admin_panel.css =================================================================== --- typo3/sysext/t3skin/stylesheets/visual/admin_panel.css (revision 0) +++ typo3/sysext/t3skin/stylesheets/visual/admin_panel.css (revision 0) @@ -0,0 +1,225 @@ +#TSFE_ADMIN_PANEL_FORM { + background-color: #ffffff; + border: 1px solid black; + -moz-box-shadow: 0px 3px 15px #808080; + -webkit-box-shadow: 0px 3px 15px #808080; + box-shadow: 0px 3px 15px #808080; + margin: 0; + padding: 0; + z-index:0; +} + +#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel { + border-collapse: separate; + margin: 0; + min-width: 315px; + padding: 0; +} + +#TSFE_ADMIN_PANEL_FORM, +#TSFE_ADMIN_PANEL_FORM a { + color: black; + font-family: Arial, sans-serif; + font-size: 12px; + text-decoration: none; +} + +#TSFE_ADMIN_PANEL_FORM a:active, +#TSFE_ADMIN_PANEL_FORM a:focus { + -moz-outline-style: none; + outline-style: none; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-hRow td, +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-fRow td { + background-image: -moz-linear-gradient(center top, #555555 10%, #444547 90%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.1, #555555), color-stop(0.1, #555555), color-stop(0.9, #444547), color-stop(1.0, #444547)); + background-color: #555555; + color: white; + font-weight: bold; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-hRow td { + cursor: move; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-fRow td { + padding-right: 5px; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-hRow td a, +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-fRow td a { + color: #ffffff; +} + +#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel-header-title { + float: left; +} + +#TSFE_ADMIN_PANEL_FORM input.typo3-adminPanel-update { + float: right; +} + +#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel-header-buttonWrapper { + display: inline-block; + float: right; + margin-left: 10px; +} + + +#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel-panel-open .typo3-adminPanel-header-button, +#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel-panel-closed .typo3-adminPanel-header-button { + background: url(../../images/arrows/adminpanel-down.png) no-repeat; + display: inline-block; + height: 19px; + float: right; + width: 19px; +} + +#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel-panel-closed .typo3-adminPanel-header-button { + background: url(../../images/arrows/adminpanel-up.png) no-repeat; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-section-title td { + background-color: #e2e0e0; + border-bottom: 1px solid #cccccc; + border-top: 1px solid #cccccc; + clear: left; + margin: 0; + padding: 0; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-section-title td a { + display: block; + height: 26px; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-section-title td a .typo3-adminPanel-label { + font-weight: bold; + padding-top: 4px; + white-space: nowrap; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-section-title td:hover { + background-color: #7e7e7e; + border-color: black; + color: #ffffff; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-section-title td:hover a { + color: #ffffff; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-section-title .typo3-adminPanel-section-open, +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-section-title .typo3-adminPanel-section-closed { + background: url(../../images/arrows/module-menu-down.png) no-repeat 12px 9px; + display: inline-block; + padding-left: 26px; + width: 100%; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-section-title .typo3-adminPanel-section-closed { + background: url(../../images/arrows/module-menu-right.png) no-repeat 12px 7px; +} + + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-section-title td:hover a.typo3-adminPanel-section-open { + background-image: url(../../images/arrows/module-menu-down-alt.png); +} + + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-section-title td:hover a.typo3-adminPanel-section-closed { + background-image: url(../../images/arrows/module-menu-right-alt.png); +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-itemRow td { + padding: 3px 5px 3px 26px; + text-align: left; + white-space: nowrap; +} + +#TSFE_ADMIN_PANEL_FORM tr.typo3-adminPanel-itemRow td.typo3-adminPanel-section-content-title { + padding-right: 9px; + padding-top: 5px; + width: 1%; +} + +#TSFE_ADMIN_PANEL_FORM td.typo3-adminPanel-section-content { + padding-right: 11px; + width: 99%; +} + +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog { + border: 1px solid #7e7e7e; +} + +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog tr, +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog td { + margin: 0; + padding: 0; +} + +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog th { + background-color: #7e7e7e; +} + +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog th span[style] { + color: #fff !important; +} + +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog .typo3-adminPanel-logRow-odd, +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog .typo3-adminPanel-logRow-even, +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog .typo3-adminpanel-logRow-highlight { + background-color: #f0f0f0; + text-align: left; + vertical-align: top; + white-space: nowrap; +} + +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog .typo3-adminPanel-tsLogTime { + text-align: center; +} + +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog .typo3-adminPanel-logRow-odd { + background-color: #dedede; +} + +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog .typo3-adminPanel-logRow-highlight { + background-color: #fcd3cf; +} + +#TSFE_ADMIN_PANEL_FORM #typo3-adminPanel-tsLog .stackPointer { + color: maroon; + vertical-align: top; +} + +/** + * General Form Styles + **/ +#TSFE_ADMIN_PANEL_FORM input[type="submit"] { + -moz-border-radius: 1px 1px 1px 1px; + background-color: #F6F6F6; + background-image: url('../../typo3/sysext/t3skin/images/backgrounds/button-hover.png'); + background-image: -moz-linear-gradient(center top , #F6F6F6 10%, #C8C8C8 90%); + background-image: -webkit-gradient(linear,0% 0%,0% 100%,color-stop(0.1,#F6F6F6),color-stop(0.9,#C8C8C8)); + background-image: linear-gradient(center top,#F6F6F6 10%,#C8C8C8 90%); + background-position: center bottom; + background-repeat:repeat-x; + border:1px solid #737C7C; + color:#434343; + cursor:pointer; + padding: 3px; +} + +#TSFE_ADMIN_PANEL_FORM input, +#TSFE_ADMIN_PANEL_FORM select { + position: static; + margin: 0 5px; + padding: 0; +} + +#TSFE_ADMIN_PANEL_FORM input[type="checkbox"] { + margin-left: 0; +} + +/** End General Form Styles **/ Index: typo3/sysext/lang/locallang_tsfe.xml =================================================================== --- typo3/sysext/lang/locallang_tsfe.xml (revision 9908) +++ typo3/sysext/lang/locallang_tsfe.xml (working copy) @@ -7,25 +7,26 @@ + - - - - + + + + - + - - + + - - + + - - - - + + + + @@ -35,13 +36,13 @@ - - - - - - - + + + + + + + Index: typo3/sysext/cms/tslib/class.tslib_adminpanel.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_adminpanel.php (revision 9908) +++ typo3/sysext/cms/tslib/class.tslib_adminpanel.php (working copy) @@ -23,7 +23,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * -* This copyright notice MUST APPEAR in all copies of the script! +* This copyright notice MUST APPEAR in all copies of the scri.pt! ***************************************************************/ /** * View class for the admin panel in frontend editing. @@ -32,6 +32,7 @@ * * @author Jeff Segars * @author David Slayback + * @author Dmitry Dulepov * @package TYPO3 * @subpackage tslib */ @@ -90,7 +91,7 @@ if (t3lib_div::_GP('ADMCMD_editIcons')) { $GLOBALS['TSFE']->displayFieldEditIcons=1; - $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_editNoPopup']=1; + $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_editNoPopup'] = 1; } if (t3lib_div::_GP('ADMCMD_simUser')) { @@ -109,25 +110,48 @@ } /** + * Obtains header data for the admin panel. + * + * @return string + */ + public function getAdminPanelHeaderData() { + $result = ''; + + // Include BE styles + $GLOBALS['TSFE']->includeTCA(); + + if(!empty($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) { + $result = ''; + } + return $result; + } + + /** * Checks if a Admin Panel section ("module") is available for the user. If so, true is returned. * * @param string The module key, eg. "edit", "preview", "info" etc. * @return boolean */ public function isAdminModuleEnabled($key) { + $result = false; + // Returns true if the module checked is "preview" and the forcePreview flag is set. - if ($key=='preview' && $this->ext_forcePreview) { - return true; + if ($key == 'preview' && $this->ext_forcePreview) { + $result = true; } // If key is not set, only "all" is checked if ($GLOBALS['BE_USER']->extAdminConfig['enable.']['all']) { - return true; + $result = true; } if ($GLOBALS['BE_USER']->extAdminConfig['enable.'][$key]) { - return true; + $result = true; } + + return $result; } /** @@ -181,37 +205,33 @@ * @param string Setting key * @return string The setting value */ - public function extGetFeAdminValue($pre, $val='') { + public function extGetFeAdminValue($sectionName, $val = '') { // Check if module is enabled. - if ($this->isAdminModuleEnabled($pre)) { + if ($this->isAdminModuleEnabled($sectionName)) { // Exceptions where the values can be overridden from backend: // deprecated - if ($pre . '_' . $val == 'edit_displayIcons' && $GLOBALS['BE_USER']->extAdminConfig['module.']['edit.']['forceDisplayIcons']) { + if ($sectionName . '_' . $val == 'edit_displayIcons' && $GLOBALS['BE_USER']->extAdminConfig['module.']['edit.']['forceDisplayIcons']) { return true; } - if ($pre . '_' . $val == 'edit_displayFieldIcons' && $GLOBALS['BE_USER']->extAdminConfig['module.']['edit.']['forceDisplayFieldIcons']) { + if ($sectionName . '_' . $val == 'edit_displayFieldIcons' && $GLOBALS['BE_USER']->extAdminConfig['module.']['edit.']['forceDisplayFieldIcons']) { return true; } // override all settings with user TSconfig - if ($GLOBALS['BE_USER']->extAdminConfig['override.'][$pre . '.'][$val] && $val) { - return $GLOBALS['BE_USER']->extAdminConfig['override.'][$pre . '.'][$val]; + if ($val && $GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName . '.'][$val]) { + return $GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName . '.'][$val]; } - if ($GLOBALS['BE_USER']->extAdminConfig['override.'][$pre]) { - return $GLOBALS['BE_USER']->extAdminConfig['override.'][$pre]; + if ($GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName]) { + return $GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName]; } - $retVal = $val ? $GLOBALS['BE_USER']->uc['TSFE_adminConfig'][$pre . '_' . $val] : 1; + $retVal = $val ? $GLOBALS['BE_USER']->uc['TSFE_adminConfig'][$sectionName . '_' . $val] : 1; - if ($pre=='preview' && $this->ext_forcePreview) { - if (!$val) { - return true; - } else { - return $retVal; - } + if ($sectionName == 'preview' && $this->ext_forcePreview) { + return (!$val ? true : $retVal); } // regular check: - if ($this->isAdminModuleOpen($pre)) { // See if the menu is expanded! + if ($this->isAdminModuleOpen($sectionName)) { // See if the menu is expanded! return $retVal; } @@ -219,9 +239,9 @@ // @deprecated since TYPO3 4.3 if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction-postProc'])) { t3lib_div::deprecationLog('Frontend admin post processing hook extEditAction-postProc is deprecated since TYPO3 4.3.'); - $_params = array('cmd' => &$cmd, 'tce' => &$this->tce, 'pObj' => &$this); - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction-postProc'] as $_funcRef) { - t3lib_div::callUserFunction($_funcRef, $_params, $this); + $params = array('cmd' => &$cmd, 'tce' => &$this->tce, 'pObj' => &$this); + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction-postProc'] as $funcRef) { + t3lib_div::callUserFunction($funcRef, $params, $this); } } } @@ -269,81 +289,75 @@ public function display() { $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_tsfe.php'); - $out = ''; - //CSS - // @todo Check how this was handled before and if it's required here - // $GLOBALS['TSFE']->additionalHeaderData['admPanelCSS'] = ''; - if(!empty($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) { - $GLOBALS['TSFE']->additionalHeaderData['admPanelCSS-Skin'] = ' - - '; - } + $moduleContent = ''; if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top']) { if ($this->isAdminModuleEnabled('preview')) { - $out .= $this->getPreviewModule(); + $moduleContent .= $this->getPreviewModule(); } if ($this->isAdminModuleEnabled('cache')) { - $out .= $this->getCacheModule(); + $moduleContent .= $this->getCacheModule(); } if ($this->isAdminModuleEnabled('publish')) { - $out .= $this->getPublishModule(); + $moduleContent .= $this->getPublishModule(); } - if ($this->isAdminModuleEnabled('edit')){ - $out .= $this->getEditModule(); + if ($this->isAdminModuleEnabled('edit')) { + $moduleContent .= $this->getEditModule(); } if ($this->isAdminModuleEnabled('tsdebug')) { - $out .= $this->getTSDebugModule(); + $moduleContent .= $this->getTSDebugModule(); } if ($this->isAdminModuleEnabled('info')) { - $out .= $this->getInfoModule(); + $moduleContent .= $this->getInfoModule(); } } - $row = ''; - $row .= ''; - $row .= '' . $this->extFw($this->extGetLL('adminOptions')) . ''; - $row .= $this->extFw(': ' . $GLOBALS['BE_USER']->user['username']); + $row = $this->extGetLL('adminPanelTitle') . ': ' . + htmlspecialchars($GLOBALS['BE_USER']->user['username']) . ''; - $header = ' - - ' . - $this->extItemLink('top',$row) . ' - - ' . ($this->extNeedUpdate ? '' : '') . ' - '; + $isVisible = $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top']; + $cssClassName = 'typo3-adminPanel-panel-' . ($isVisible ? 'open' : 'closed'); + $header = '' . + '' . + '' . $row . '' . + $this->linkSectionHeader('top', '', 'typo3-adminPanel-header-buttonWrapper') . + '
' . + ''; - $query = !t3lib_div::_GET('id') ? ('' . LF) : ''; + if ($moduleContent) { + $footer = '' . + '' . + ($this->extNeedUpdate ? ' ' : '') . '' . + ''; + } else { + $footer = ''; + } + + $query = !t3lib_div::_GET('id') ? ('') : ''; // the dummy field is needed for Firefox: to force a page reload on submit with must change the form value with JavaScript (see "onsubmit" attribute of the "form" element") - $query .= ''; + $query .= ''; foreach (t3lib_div::_GET() as $key => $value) { if ($key != 'TSFE_ADMIN_PANEL') { if (is_array($value)) { $query .= $this->getHiddenFields($key, $value); } else { - $query .= '' . LF; + $query .= ''; } } } $out = ' - -
' . -$query . ' - ' . - $header . - $out . ' -
-
'; + +
' . +$query . '' . + $header . $moduleContent . $footer . '
'; if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top']) { $out .= ''; - $out .= ' - - '; + }') . '/*]]>*/'; } - $out = ' -
- ' . $out . ' -
- '; + $out .= ' + +'; return $out; } @@ -393,7 +407,7 @@ * @return string hidden fields * @see display() */ - protected function getHiddenFields($key, &$val) { + protected function getHiddenFields($key, array $val) { $out = ''; foreach ($val as $k => $v) { if (is_array($v)) { @@ -414,20 +428,19 @@ /** * Creates the content for the "preview" section ("module") of the Admin Panel * - * @param string Optional start-value; The generated content is added to this variable. * @return string HTML content for the section. Consists of a string with table-rows with four columns. * @see display() */ - protected function getPreviewModule($out = '') { - $out .= $this->extGetHead('preview'); + protected function getPreviewModule() { + $out = $this->extGetHead('preview'); if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_preview']) { $this->extNeedUpdate = true; - $out .= $this->extGetItem('preview_showHiddenPages', 'uc['TSFE_adminConfig']['preview_showHiddenPages'] ? ' checked="checked"' : '') . ' />'); - $out .= $this->extGetItem('preview_showHiddenRecords', 'uc['TSFE_adminConfig']['preview_showHiddenRecords'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('preview_showHiddenPages', '', 'uc['TSFE_adminConfig']['preview_showHiddenPages'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('preview_showHiddenRecords', '', 'uc['TSFE_adminConfig']['preview_showHiddenRecords'] ? ' checked="checked"' : '') . ' />'); // Simulate date - $out .= $this->extGetItem('preview_simulateDate', ''); - $this->extJSCODE .= 'TSFEtypo3FormFieldSet("TSFE_ADMIN_PANEL[preview_simulateDate]", "datetime", "", 1,0);'; + $out .= $this->extGetItem('preview_simulateDate', ''); + $this->extJSCODE .= 'TSFEtypo3FormFieldSet("TSFE_ADMIN_PANEL[preview_simulateDate]", "datetime", "", 0, 0);'; // Simulate fe_user: $options = ''; @@ -448,21 +461,21 @@ /** * Creates the content for the "cache" section ("module") of the Admin Panel * - * @param string Optional start-value; The generated content is added to this variable. * @return string HTML content for the section. Consists of a string with table-rows with four columns. * @see display() */ - protected function getCacheModule($out = '') { - $out.= $this->extGetHead('cache'); + protected function getCacheModule() { + $out = $this->extGetHead('cache'); if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_cache']) { $this->extNeedUpdate = true; - $out .= $this->extGetItem('cache_noCache', 'uc['TSFE_adminConfig']['cache_noCache'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('cache_noCache', '', 'uc['TSFE_adminConfig']['cache_noCache'] ? ' checked="checked"' : '') . ' />'); + $levels = $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['cache_clearCacheLevels']; $options = ''; - $options .= ''; - $options .= ''; - $options .= ''; + $options .= ''; + $options .= ''; + $options .= ''; $out .= $this->extGetItem('cache_clearLevels', '' . - ''); + ' '); // Generating tree: $depth = $this->extGetFeAdminValue('cache', 'clearCacheLevels'); @@ -471,12 +484,10 @@ $GLOBALS['BE_USER']->extPageInTreeInfo[] = array($GLOBALS['TSFE']->page['uid'], htmlspecialchars($GLOBALS['TSFE']->page['title']), $depth+1); $GLOBALS['BE_USER']->extGetTreeList($GLOBALS['TSFE']->id, $depth, 0, $GLOBALS['BE_USER']->getPagePermsClause(1)); foreach ($GLOBALS['BE_USER']->extPageInTreeInfo as $row) { - $outTable .= ' - - ' . $this->extFw($row[1]) . ' - - ' . $this->extFw($GLOBALS['BE_USER']->extGetNumberOfCachedPages($row[0])) . ' - '; + $outTable .= '' . + ' ' . htmlspecialchars($row[1]) . + '' . $GLOBALS['BE_USER']->extGetNumberOfCachedPages($row[0]) . ''; } $outTable = '
' . $outTable . '
'; @@ -495,14 +506,15 @@ * @return string HTML content for the section. Consists of a string with table-rows with four columns. * @see display() */ - protected function getPublishModule($out = '') { - $out .= $this->extGetHead('publish'); + protected function getPublishModule() { + $out = $this->extGetHead('publish'); if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_publish']) { $this->extNeedUpdate = true; + $levels = $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['publish_levels']; $options = ''; - $options .= ''; - $options .= ''; - $options .= ''; + $options .= ''; + $options .= ''; + $options .= ''; $out .= $this->extGetItem('publish_levels', '' . ' '); @@ -513,12 +525,10 @@ $GLOBALS['BE_USER']->extPageInTreeInfo[] = array($GLOBALS['TSFE']->page['uid'], htmlspecialchars($GLOBALS['TSFE']->page['title']), $depth+1); $GLOBALS['BE_USER']->extGetTreeList($GLOBALS['TSFE']->id, $depth, 0, $GLOBALS['BE_USER']->getPagePermsClause(1)); foreach ($GLOBALS['BE_USER']->extPageInTreeInfo as $row) { - $outTable.= ' - - ' . $this->extFw($row[1]) . ' - - ' . $this->extFw('...') . ' - '; + $outTable.= '' . + '' . $row[1] . + '...'; } $outTable = '
' . $outTable . '
'; $outTable .= ''; @@ -532,12 +542,11 @@ /** * Creates the content for the "edit" section ("module") of the Admin Panel * - * @param string Optional start-value; The generated content is added to this variable. * @return string HTML content for the section. Consists of a string with table-rows with four columns. * @see display() */ - protected function getEditModule($out = '') { - $out .= $this->extGetHead('edit'); + protected function getEditModule() { + $out = $this->extGetHead('edit'); if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_edit']) { // If another page module was specified, replace the default Page module with the new one @@ -545,10 +554,10 @@ $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout'; $this->extNeedUpdate = true; - $out .= $this->extGetItem('edit_displayFieldIcons', 'uc['TSFE_adminConfig']['edit_displayFieldIcons'] ? ' checked="checked"' : '') . ' />'); - $out .= $this->extGetItem('edit_displayIcons', 'uc['TSFE_adminConfig']['edit_displayIcons'] ? ' checked="checked"' : '') . ' />'); - $out .= $this->extGetItem('edit_editFormsOnPage', 'uc['TSFE_adminConfig']['edit_editFormsOnPage'] ? ' checked="checked"':'') . ' />'); - $out .= $this->extGetItem('edit_editNoPopup', 'uc['TSFE_adminConfig']['edit_editNoPopup'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('edit_displayFieldIcons', '', 'uc['TSFE_adminConfig']['edit_displayFieldIcons'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('edit_displayIcons', '', 'uc['TSFE_adminConfig']['edit_displayIcons'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('edit_editFormsOnPage', '', 'uc['TSFE_adminConfig']['edit_editFormsOnPage'] ? ' checked="checked"':'') . ' />'); + $out .= $this->extGetItem('edit_editNoPopup', '', 'uc['TSFE_adminConfig']['edit_editNoPopup'] ? ' checked="checked"' : '') . ' />'); $out .= $this->extGetItem('', $this->ext_makeToolBar()); if (!t3lib_div::_GP('ADMCMD_view')) { @@ -567,7 +576,7 @@ } return false; '). - '">' . $this->extFw($this->extGetLL('edit_openAB')) . ''); + '">' . $this->extGetLL('edit_openAB') . ''); } } @@ -577,22 +586,21 @@ /** * Creates the content for the "tsdebug" section ("module") of the Admin Panel * - * @param string Optional start-value; The generated content is added to this variable. * @return string HTML content for the section. Consists of a string with table-rows with four columns. * @see display() */ - protected function getTSDebugModule($out = '') { - $out .= $this->extGetHead('tsdebug'); + protected function getTSDebugModule() { + $out = $this->extGetHead('tsdebug'); if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_tsdebug']) { $this->extNeedUpdate = true; - $out .= $this->extGetItem('tsdebug_tree', 'uc['TSFE_adminConfig']['tsdebug_tree'] ? ' checked="checked"' : '') . ' />'); - $out .= $this->extGetItem('tsdebug_displayTimes', 'uc['TSFE_adminConfig']['tsdebug_displayTimes'] ? ' checked="checked"' : '') . ' />'); - $out .= $this->extGetItem('tsdebug_displayMessages', 'uc['TSFE_adminConfig']['tsdebug_displayMessages'] ? ' checked="checked"':'') . ' />'); - $out .= $this->extGetItem('tsdebug_LR', 'uc['TSFE_adminConfig']['tsdebug_LR'] ? ' checked="checked"' : '') . ' />'); - $out .= $this->extGetItem('tsdebug_displayContent', 'uc['TSFE_adminConfig']['tsdebug_displayContent'] ? ' checked="checked"' : '') . ' />'); - $out .= $this->extGetItem('tsdebug_displayQueries', 'uc['TSFE_adminConfig']['tsdebug_displayQueries'] ? ' checked="checked"' : '') . ' />'); - $out .= $this->extGetItem('tsdebug_forceTemplateParsing', 'uc['TSFE_adminConfig']['tsdebug_forceTemplateParsing'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('tsdebug_tree', '', 'uc['TSFE_adminConfig']['tsdebug_tree'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('tsdebug_displayTimes', '', 'uc['TSFE_adminConfig']['tsdebug_displayTimes'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('tsdebug_displayMessages', '', 'uc['TSFE_adminConfig']['tsdebug_displayMessages'] ? ' checked="checked"':'') . ' />'); + $out .= $this->extGetItem('tsdebug_LR', '', 'uc['TSFE_adminConfig']['tsdebug_LR'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('tsdebug_displayContent', '', 'uc['TSFE_adminConfig']['tsdebug_displayContent'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('tsdebug_displayQueries', '', 'uc['TSFE_adminConfig']['tsdebug_displayQueries'] ? ' checked="checked"' : '') . ' />'); + $out .= $this->extGetItem('tsdebug_forceTemplateParsing', '', 'uc['TSFE_adminConfig']['tsdebug_forceTemplateParsing'] ? ' checked="checked"' : '') . ' />'); $GLOBALS['TT']->printConf['flag_tree'] = $this->extGetFeAdminValue('tsdebug', 'tree'); $GLOBALS['TT']->printConf['allTime'] = $this->extGetFeAdminValue('tsdebug', 'displayTimes'); @@ -600,11 +608,7 @@ $GLOBALS['TT']->printConf['flag_content'] = $this->extGetFeAdminValue('tsdebug', 'displayContent'); $GLOBALS['TT']->printConf['flag_queries'] = $this->extGetFeAdminValue('tsdebug', 'displayQueries'); - $out.= ' - - - ' . $GLOBALS['TT']->printTSlog() . ' - '; + $out.= '' . $GLOBALS['TT']->printTSlog() . ''; } return $out; @@ -613,12 +617,11 @@ /** * Creates the content for the "info" section ("module") of the Admin Panel * - * @param string Optional start-value; The generated content is added to this variable. * @return string HTML content for the section. Consists of a string with table-rows with four columns. * @see display() */ - protected function getInfoModule($out = '') { - $out .= $this->extGetHead('info'); + protected function getInfoModule() { + $out = $this->extGetHead('info'); if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_info']) { $tableArr = array(); @@ -660,28 +663,21 @@ foreach ($tableArr as $arr) { if (strlen($arr[0])) { // Put text wrapped by "*" between tags $value1 = preg_replace('/^\*(.*)\*$/', '$1', $arr[0], -1, $count); - $value1 = ($count?'':'') . $this->extFw($value1) . ($count?'':''); + $value1 = ($count?'':'') . $value1 . ($count?'':''); } else { - $value1 = $this->extFw(' '); + $value1 = ' '; } $value2 = strlen($arr[1]) ? $arr[1] : ' '; - $value2 = $this->extFw($value2); + $value2 = $value2; - $table .= ' - - ' . $value1 . ' - ' . $value2 . ' - '; + $table .= '' . + '' . $value1 . '' . + '' . $value2 . '' . + ''; } - $table = '' . $table . '
'; - - $out .= ' - - - ' . $table . ' - '; + $out .= $table; } return $out; @@ -703,16 +699,15 @@ * @access private * @see extGetItem() */ - protected function extGetHead($pre) { - $out = ''; - $out .= ''; - $out .= $this->extFw($this->extGetLL($pre)); + protected function extGetHead($sectionSuffix) { + $settingName = 'display_' . $sectionSuffix; + $isVisible = $GLOBALS['BE_USER']->uc['TSFE_adminConfig'][$settingName]; + $cssClassName = 'typo3-adminPanel-section-' . ($isVisible ? 'open' : 'closed'); - $out = $this->extItemLink($pre,$out); - return ' - - ' . $out . ' - '; + return '' . + $this->linkSectionHeader($sectionSuffix, $this->extGetLL($sectionSuffix), $cssClassName) . + ''; } /** @@ -724,10 +719,10 @@ * @access private * @see extGetHead() */ - protected function extItemLink($pre, $str) { - return '' . $str . ''; + protected function linkSectionHeader($sectionSuffix, $sectionTitle, $className = '') { + return '
' . $sectionTitle . '
'; } /** @@ -740,67 +735,52 @@ * @access private * @see extGetHead() */ - protected function extGetItem($pre, $element) { - $out = ' - - - ' . ($pre ? $this->extFw($this->extGetLL($pre)) : ' ') . ' - - ' . $element . ' - '; + protected function extGetItem($title, $content = '', $checkboxContent = '') { + $out = '' . + '' . $checkboxContent . ($title ? $this->extGetLL($title) : ' ') . $content . ''; return $out; } /** - * Wraps a string in a span-tag with black verdana font - * - * @param string The string to wrap - * @return string - */ - protected function extFw($str) { - return '' . $str . ''; - } - - /** * Creates the tool bar links for the "edit" section of the Admin Panel. * * @return string A string containing images wrapped in -tags linking them to proper functions. */ public function ext_makeToolBar() { // If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead: - $tmpTSc = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'mod.web_list'); - $tmpTSc = $tmpTSc ['properties']['newContentWiz.']['overrideWithExtension']; - $newContentWizScriptPath = t3lib_extMgm::isLoaded($tmpTSc) ? (t3lib_extMgm::extRelPath($tmpTSc) . 'mod1/db_new_content_el.php') : (TYPO3_mainDir . 'sysext/cms/layout/db_new_content_el.php'); + $tsConfig = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'mod.web_list'); + $tsConfig = $tsConfig ['properties']['newContentWiz.']['overrideWithExtension']; + $newContentWizScriptPath = t3lib_extMgm::isLoaded($tsConfig) ? (t3lib_extMgm::extRelPath($tsConfig) . 'mod1/db_new_content_el.php') : (TYPO3_mainDir . 'sysext/cms/layout/db_new_content_el.php'); $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page); $langAllowed = $GLOBALS['BE_USER']->checkLanguageAccess($GLOBALS['TSFE']->sys_language_uid); - $toolBar = ''; $id = $GLOBALS['TSFE']->id; - $toolBar .= '' . - ''; + $toolBar = '' . + ''; - if ($perms&16 && $langAllowed) { + if (($perms & 16) && $langAllowed) { $params = ''; if ($GLOBALS['TSFE']->sys_language_uid) { $params = '&sys_language_uid=' . $GLOBALS['TSFE']->sys_language_uid; } $toolBar .= '' . - ''; + ''; } - if ($perms&2) { + if (($perms & 2)) { $toolBar .= '' . - ''; + ''; } - if ($perms&8) { + if (($perms & 8)) { $toolBar .= '' . - ''; + ''; } - if ($perms&2) { + if (($perms & 2)) { $params = '&edit[pages][' . $id . ']=edit'; - $toolBar .= '' . - ''; + $toolBar .= '' . + ''; if ($GLOBALS['TSFE']->sys_language_uid && $langAllowed) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( @@ -811,8 +791,8 @@ $GLOBALS['TSFE']->sys_page->versionOL('pages_language_overlay',$row); if (is_array($row)) { $params = '&edit[pages_language_overlay][' . $row['uid'] . ']=edit'; - $toolBar .= '' . - ''; + $toolBar .= '' . + ''; } } } @@ -820,8 +800,8 @@ $urlParams = array(); $urlParams['id'] = $id; $urlParams['returnUrl'] = t3lib_div::getIndpEnv('REQUEST_URI'); - $toolBar .= '' . - ''; + $toolBar .= '' . + ''; } return $toolBar; @@ -831,6 +811,8 @@ * Returns the label for key, $key. If a translation for the language set in $GLOBALS['BE_USER']->uc['lang'] is found that is returned, otherwise the default value. * IF the global variable $LOCAL_LANG is NOT an array (yet) then this function loads the global $LOCAL_LANG array with the content of "sysext/lang/locallang_tsfe.php" so that the values therein can be used for labels in the Admin Panel * + * FIXME The function should onvert to $TSFE->renderCharset, not to UTF8! + * * @param string Key for a label in the $LOCAL_LANG array of "sysext/lang/locallang_tsfe.php" * @return string The value for the $key */ @@ -838,7 +820,7 @@ $labelStr = htmlspecialchars($GLOBALS['LANG']->getLL($key)); // Label string in the default backend output charset. // Convert to utf-8, then to entities: - if ($GLOBALS['LANG']->charSet!='utf-8') { + if ($GLOBALS['LANG']->charSet != 'utf-8') { $labelStr = $GLOBALS['LANG']->csConvObj->utf8_encode($labelStr,$GLOBALS['LANG']->charSet); } $labelStr = $GLOBALS['LANG']->csConvObj->utf8_to_entities($labelStr); Index: typo3/sysext/cms/tslib/index_ts.php =================================================================== --- typo3/sysext/cms/tslib/index_ts.php (revision 9908) +++ typo3/sysext/cms/tslib/index_ts.php (working copy) @@ -211,7 +211,7 @@ t3lib_div::_GP('MP'), t3lib_div::_GP('RDCT') ); -/* @var $TSFE tslib_fe */ +/** @var $TSFE tslib_fe */ if($TYPO3_CONF_VARS['FE']['pageUnavailable_force'] && !t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $TYPO3_CONF_VARS['SYS']['devIPmask'])) { @@ -275,6 +275,7 @@ // BE_USER // ********* $BE_USER = NULL; +/** @var $BE_USER t3lib_tsfeBeUserAuth */ if ($_COOKIE['be_typo_user']) { // If the backend cookie is set, we proceed and checks if a backend user is logged in. $TYPO3_MISC['microtime_BE_USER_start'] = microtime(true); $TT->push('Back End user initialized',''); @@ -468,6 +469,7 @@ // *************** // Output content // *************** +$sendTSFEContent = false; if ($TSFE->isOutputting()) { $TT->push('Print Content',''); $TSFE->processOutput(); @@ -507,7 +509,7 @@ $TT->pull(); } else { - echo $TSFE->content; + $sendTSFEContent = true; } $TT->pull(); } @@ -575,9 +577,14 @@ // Admin panel // ************* if (is_object($BE_USER) && $BE_USER->isAdminPanelVisible() && $TSFE->beUserLogin) { - echo $BE_USER->displayAdminPanel(); + $TSFE->content = str_ireplace('', $BE_USER->adminPanel->getAdminPanelHeaderData() . '', $TSFE->content); + $TSFE->content = str_ireplace('', $BE_USER->displayAdminPanel() . '', $TSFE->content); } +if ($sendTSFEContent) { + echo $TSFE->content; +} + // ************* // Debugging Output // *************