--- kernel/classes/datatypes/ezselection/ezselectiontype.php 10 Aug 2005 13:11:13 -0000 1.1 +++ kernel/classes/datatypes/ezselection/ezselectiontype.php 12 Sep 2006 16:50:55 -0000 1.2 @@ -264,6 +264,14 @@ { $selected = $this->objectAttributeContent( $contentObjectAttribute ); $classContent = $this->classAttributeContent( $contentObjectAttribute->attribute( 'contentclass_attribute' ) ); + + // We create a hash table to easily find an option name against an option id + $classOptions = array(); + foreach($classContent['options'] as $option) + { + // The hash key must be a string to avoid an automatic id incrementation by PHP4 + $classOptions["opt".$option['id']]=$option['name']; + } $return = ""; if ( count( $selected ) == 0) { @@ -280,7 +288,7 @@ $return .= $classContent['options'][$id-1]['name'];*/ if ( $count != 0 ) $return .= ', '; - $return .= $classContent['options'][$id]['name']; + $return .= $classOptions["opt".$id]; $count++; } return $return;