[TASK] Cleanup feedit

Change-Id: I8eca6524c69ee71973411b4b791ee7b33bdcda82
Resolves: #45116
Releases: 6.1
Reviewed-on: https://review.typo3.org/17985
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
This commit is contained in:
Wouter Wolters 2013-02-03 19:53:04 +01:00 committed by Christian Kuhn
parent 3b6aa49b8e
commit 13474e3455
2 changed files with 91 additions and 80 deletions

View file

@ -27,6 +27,7 @@ namespace TYPO3\CMS\Feedit;
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* View class for the edit panels in frontend editing.
*
@ -317,7 +318,18 @@ class FrontendEditPanel {
* @see editPanelPreviewBorder()
*/
protected function isDisabled($table, $row) {
if ($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled']] || $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['fe_group'] && $GLOBALS['TSFE']->simUserGroup && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['fe_group']] == $GLOBALS['TSFE']->simUserGroup || $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['starttime'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['starttime']] > $GLOBALS['EXEC_TIME'] || $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime']] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime']] < $GLOBALS['EXEC_TIME']) {
if (
$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'] &&
$row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled']] ||
$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['fe_group'] &&
$GLOBALS['TSFE']->simUserGroup &&
$row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['fe_group']] == $GLOBALS['TSFE']->simUserGroup ||
$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['starttime'] &&
$row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['starttime']] > $GLOBALS['EXEC_TIME'] ||
$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime'] &&
$row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime']] &&
$row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime']] < $GLOBALS['EXEC_TIME']
) {
return TRUE;
}
}
@ -386,5 +398,4 @@ class FrontendEditPanel {
}
?>

View file

@ -3,5 +3,5 @@ if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// Register the edit panel view.
$TYPO3_CONF_VARS['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'] = 'EXT:feedit/Classes/FrontendEditPanel.php:TYPO3\\CMS\\Feedit\\FrontendEditPanel';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'] = 'EXT:feedit/Classes/FrontendEditPanel.php:TYPO3\\CMS\\Feedit\\FrontendEditPanel';
?>