/** * Check if there are changes between old and new value for this field * * @param Tracker_Artifact_ChangesetValue $previous_changesetvalue The data stored in the db * @param mixed $new_value May be string or array * * @return bool true if there are differences */ public function hasChanges($previous_changesetvalue, $new_value) { return $previous_changesetvalue->getText() != $new_value; }
/** * Fetch the html code to display the field value in tooltip * * @param Tracker_Artifact $artifact * @param Tracker_Artifact_ChangesetValue_String $value The ChangesetValue_String * @return string The html code to display the field value in tooltip */ protected function fetchTooltipValue(Tracker_Artifact $artifact, Tracker_Artifact_ChangesetValue $value = null) { $hp = Codendi_HTMLPurifier::instance(); $html = ''; if ($value) { $html .= $hp->purify($value->getText(), CODENDI_PURIFIER_CONVERT_HTML); } return $html; }