Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/parser/DifferentialChangesetParser.php
| Show First 20 Lines • Show All 868 Lines • ▼ Show 20 Lines | public function render( | ||||
| $offset_mode = $this->getOffsetMode(); | $offset_mode = $this->getOffsetMode(); | ||||
| if ($offset_mode) { | if ($offset_mode) { | ||||
| if ($offset_mode == 'new') { | if ($offset_mode == 'new') { | ||||
| $offset_map = $this->new; | $offset_map = $this->new; | ||||
| } else { | } else { | ||||
| $offset_map = $this->old; | $offset_map = $this->old; | ||||
| } | } | ||||
| // NOTE: Inline comments use zero-based lengths. For example, a comment | |||||
| // that starts and ends on line 123 has length 0. Rendering considers | |||||
| // this range to have length 1. Probably both should agree, but that | |||||
| // ship likely sailed long ago. Tweak things here to get the two systems | |||||
| // to agree. See PHI985, where this affected mail rendering of inline | |||||
| // comments left on the final line of a file. | |||||
| $range_end = $this->getOffset($offset_map, $range_start + $range_len); | $range_end = $this->getOffset($offset_map, $range_start + $range_len); | ||||
| $range_start = $this->getOffset($offset_map, $range_start); | $range_start = $this->getOffset($offset_map, $range_start); | ||||
| $range_len = ($range_end - $range_start); | $range_len = ($range_end - $range_start) + 1; | ||||
| } | } | ||||
| $render_pch = $this->shouldRenderPropertyChangeHeader($this->changeset); | $render_pch = $this->shouldRenderPropertyChangeHeader($this->changeset); | ||||
| $rows = max( | $rows = max( | ||||
| count($this->old), | count($this->old), | ||||
| count($this->new)); | count($this->new)); | ||||
| ▲ Show 20 Lines • Show All 596 Lines • Show Last 20 Lines | |||||