[TYPO3-core] RFC#14538: Icons missing in page tree for "Page contains" pages
Steffen Kamper
info at sk-typo3.de
Sun Jun 13 00:03:53 CEST 2010
Hi,
+1 by reading except last lines
+ krsort($recordType, SORT_NUMERIC);
i think wrong decision for a numeric array and the purpose. Qute from
doc: "This is useful mainly for associative arrays. "
I suggest:
$recordType = array_reverse($recordType);
+ while ($iconName === '' && (list($key, $icon) = each($recordType))) {
+ $iconName = (in_array($icon,
$GLOBALS['TBE_STYLES']['spriteIconApi']['iconsAvailable']) ? $icon : '');
+ }
list inside while looks bad designed, also readability isn't good. i
suggest:
foreach ($recordType as $key => $icon) {
if (in_array($icon,
$GLOBALS['TBE_STYLES']['spriteIconApi']['iconsAvailable'])) {
$iconName = $icon;
break;
}
}
vg Steffen
More information about the TYPO3-team-core
mailing list