$log = new History();
$log->bugid = $bug['bugid'];
+// setup new logging
+require_once('./includes/class_logging.php');
+$log2 = new Logging;
+$log2->set_bugid($bug['bugid']);
+
+$bugfields = array(
+ 'duplicateof',
+ 'dependency',
+ 'hidden',
+ 'summary',
+ 'status',
+ 'severity',
+ 'priority',
+ 'versionid' => 'version',
+ 'assignedto' => 'assignto',
+ 'resolution',
+ 'productid' => 'product',
+ 'componentid' => 'component'
+);
+
// ###################################################################
if ($_POST['do'] == 'update')
$bugapi->dorelations = array();
$bugapi->fetch();
+ $log2->add_data(true, $bugapi->objdata, $bugfields);
+
// -------------------------------------------------------------------
// handle autoaction
$autoaction = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "autoaction WHERE actionid = " . $bugsys->input_clean('autoaction', TYPE_UINT));
$bugapi->set('assignedto', $bugsys->in['assignedto']);
}
+ $log2->add_data(false, $bugapi->values, $bugfields);
+ print_r($log2); exit;
+
$bugapi->update();
// -------------------------------------------------------------------
$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))
+ {
+
+ }
+ }
+ }
+ }
}
/*=====================================================================*\