--- lib/class.tx_commerce_element_alib.php.old 2010-08-26 17:24:29.000000000 +0200 +++ lib/class.tx_commerce_element_alib.php 2010-08-27 09:16:36.000000000 +0200 @@ -235,28 +235,25 @@ } /** - * Addes a field to Class fieldlist - * used for hook to add own fields to output - * @param $fieldname Databas fieldname + * Adds a field to the $fieldlist variable + * used for hooks to add own fields to the output + * Basically it creates an array with the string as value + * and calls $this->add_fields_to_fieldlist + * @param $fieldname Database fieldname * @todo Add Check if field exists in Database */ - function add_field_to_fieldlist($fieldname){ - array_push($this->fieldlist, trim($fieldname)); + $this->add_fields_to_fieldlist(array($fieldname)); } + /** - * Addes a fields to Class fieldlist - * used for hook to add own fields to output - * Basically calls $this->add_fiel_to_fieldlist for each element - * @param $fieldlistr arary of databse filednames + * Adds a set of fields to the $fieldlist variable + * used for hooks to add own fields to the output + * @param $fieldlistr array of databse filednames * @todo Add Check if field exists in Database */ - function add_fields_to_fieldlist($fieldarray){ - foreach ($fieldarray as $newfield){ - $this->add_field_to_fieldlist($newfield); - } - + $this->fieldlist = array_merge($this->fieldlist, (array)$fieldarray); } /**