Differential D20197 Diff 48229 src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
Show First 20 Lines • Show All 217 Lines • ▼ Show 20 Lines | for ($ii = $range_start; $ii < $range_start + $range_len; $ii++) { | ||||
$not_copied = | $not_copied = | ||||
// If this line only changed depth, copy markers are pointless. | // If this line only changed depth, copy markers are pointless. | ||||
(!isset($copy_lines[$n_num])) || | (!isset($copy_lines[$n_num])) || | ||||
(isset($depth_only[$ii])) || | (isset($depth_only[$ii])) || | ||||
($new_lines[$ii]['type'] == '\\'); | ($new_lines[$ii]['type'] == '\\'); | ||||
if ($not_copied) { | if ($not_copied) { | ||||
$n_copy = phutil_tag('td', array('class' => "copy {$n_class}")); | $n_copy = phutil_tag('td', array('class' => 'copy')); | ||||
} else { | } else { | ||||
list($orig_file, $orig_line, $orig_type) = $copy_lines[$n_num]; | list($orig_file, $orig_line, $orig_type) = $copy_lines[$n_num]; | ||||
$title = ($orig_type == '-' ? 'Moved' : 'Copied').' from '; | $title = ($orig_type == '-' ? 'Moved' : 'Copied').' from '; | ||||
if ($orig_file == '') { | if ($orig_file == '') { | ||||
$title .= "line {$orig_line}"; | $title .= "line {$orig_line}"; | ||||
} else { | } else { | ||||
$title .= | $title .= | ||||
basename($orig_file). | basename($orig_file). | ||||
":{$orig_line} in dir ". | ":{$orig_line} in dir ". | ||||
dirname('/'.$orig_file); | dirname('/'.$orig_file); | ||||
} | } | ||||
$class = ($orig_type == '-' ? 'new-move' : 'new-copy'); | $class = ($orig_type == '-' ? 'new-move' : 'new-copy'); | ||||
$n_copy = javelin_tag( | $n_copy = javelin_tag( | ||||
'td', | 'td', | ||||
array( | array( | ||||
'meta' => array( | 'meta' => array( | ||||
'msg' => $title, | 'msg' => $title, | ||||
), | ), | ||||
'class' => 'copy '.$class, | 'class' => 'copy '.$class, | ||||
), | )); | ||||
''); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
if (isset($hunk_starts[$o_num])) { | if (isset($hunk_starts[$o_num])) { | ||||
$html[] = $context_not_available; | $html[] = $context_not_available; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines |