Project

General

Profile

Bug #23588 » 15781-pages-icon.patch

Administrator Admin, 2010-09-24 07:59

View differences:

t3lib/class.t3lib_iconworks.php (working copy)
// First, find the icon file name. This can depend on configuration in TCA, field values and more:
if ($table=='pages') {
$iconfile = '';
// @TODO: RFC #7370: doktype 2&5 are deprecated since TYPO3 4.2-beta1
if ($row['nav_hide'] && ($row['doktype']==1||$row['doktype']==2)) $row['doktype'] = 5; // Workaround to change the icon if "Hide in menu" was set
......
if ($row['module'] && $ICON_TYPES[$row['module']]['icon']) {
$iconfile = $ICON_TYPES[$row['module']]['icon'];
}
if (empty($iconfile) && !$iconfile = $TCA[$table]['ctrl']['typeicons'][$row[$TCA[$table]['ctrl']['typeicon_column']]]) {
$iconfile = (($TCA[$table]['ctrl']['iconfile']) ? $TCA[$table]['ctrl']['iconfile'] : $table . '.gif');
}
} else {
if (!$iconfile = $TCA[$table]['ctrl']['typeicons'][$row[$TCA[$table]['ctrl']['typeicon_column']]]) {
$iconfile = (($TCA[$table]['ctrl']['iconfile']) ? $TCA[$table]['ctrl']['iconfile'] : $table.'.gif');
(3-3/3)