3 class MTrackSCMFileEvent
5 /** Name of affected file */
7 /** Change status indicator */
17 /** when used in a string context, just return the filename.
18 * This simplifies explicit object vs. string interpretation
19 * throughout the SCM layer */
20 function __toString() {
24 function changesToHtml()
26 switch($this->status) {
27 case 'D': return 'Deleted';
28 case 'M': return 'Changed lines : ' . ( $this->added ? '+' .$this->added : '') . ' ' . ( $this->removed ? '-' .$this->removed : '');
29 case 'A': return 'Added : ' . ( $this->added ? '+' .$this->added : '') ;
30 default : '??' . $this->status;
37 ($this->status == 'D' ? '<del>' : '') .
38 htmlspecialchars($this->name) .
39 ($this->status == 'D' ? '</del>' : '');