1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Fix a Harbormaster build log issue where too few header lines were returned when expanding logs in the middle

Summary: Ref T13088. This variable bled through from an earlier loop and caused us to drop some of the lines in the middle.

Test Plan: Clicked "Show More", got an equal number of header and footer lines.

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13088

Differential Revision: https://secure.phabricator.com/D19148
This commit is contained in:
epriestley 2018-02-28 05:42:55 -08:00
parent ada4f65565
commit 985d499f50

View file

@ -167,7 +167,7 @@ final class HarbormasterBuildLogRenderController
'Unable to find lines.'));
}
if ($direction > 0) {
if ($view['direction'] > 0) {
$slice_offset = $anchor_key;
} else {
$slice_offset = max(0, $anchor_key - ($view['lines'] - 1));
@ -589,7 +589,7 @@ final class HarbormasterBuildLogRenderController
$up_text);
$mid_text = pht(
'Show More (%s bytes Hidden)',
'Show More (%s Bytes)',
new PhutilNumber($range['tail'] - $range['head']));
$expand_mid = javelin_tag(