From 985d499f50998011e047226cc89e4096a4311b4b Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 28 Feb 2018 05:42:55 -0800 Subject: [PATCH] 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 --- .../controller/HarbormasterBuildLogRenderController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php b/src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php index c1c4275982..50b17523ca 100644 --- a/src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php +++ b/src/applications/harbormaster/controller/HarbormasterBuildLogRenderController.php @@ -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(