bugid = $newbugid; } // ################################################################### /** * Assigns data into the $this->original or $this->modified array based * on the passed arrays of information and the fields to add (and what * name to add them under), the element they go into, and any prefix * * @access public * * @param bool TRUE for original, FALSE for modified * @param array Data array * @param array List of fields in the data array to add; in format of array('field name' => 'display name', 'display name 2', 'display name 3') * @param string Element to add to * @param string Field prefix */ function add_data($orig, $data, $fields, $element = '', $prefix = '') { $array = ($orig ? 'original' : 'modified'); $prefix .= ($prefix != '' ? '.' : ''); foreach ($fields AS $fname => $fdisplay) { if (is_numeric($fname)) { $fname = $fdisplay; } $this->{$array}["$element"]["$prefix$fdisplay"] = $data["$fname"]; } } // ################################################################### /** * Adds strings to the IDs so that it's human-readable and that's * stored in the database so that if whatever value is deleted, * the text still exists in the end. This takes the element and a list * of fields to prossess in order to work. * * @access public * * @param string Element name * @param array List of fields to use */ function process_fields($element, $fields) { foreach (array('original', 'modified') AS $array) { foreach ($this->{$array}["$element"] AS $display => $fname) { if (in_array($fname, $fields)) { } } } } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>