From 86720b4595a71818e6ef21f7210ae3403032c69b Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 22 Mar 2016 09:20:32 -0700 Subject: [PATCH] Fix tag limit logic in PHUIHandleTagListView Summary: Fixes T10648. This was goofed and always did a meaningless no-op slice -- I mucked it up while doing the disabled project stuff elsewhere. Test Plan: - Tagged something with 5 projects. - Saw the list sliced to 4 (the limit) with "...". Reviewers: chad Reviewed By: chad Maniphest Tasks: T10648 Differential Revision: https://secure.phabricator.com/D15508 --- src/applications/phid/view/PHUIHandleTagListView.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/phid/view/PHUIHandleTagListView.php b/src/applications/phid/view/PHUIHandleTagListView.php index b789fa1bf1..eb909d4b86 100644 --- a/src/applications/phid/view/PHUIHandleTagListView.php +++ b/src/applications/phid/view/PHUIHandleTagListView.php @@ -61,7 +61,7 @@ final class PHUIHandleTagListView extends AphrontTagView { } } - if ($this->limit && ($this->limit > count($handles))) { + if ($this->limit && (count($handles) > $this->limit)) { if (!is_array($handles)) { $handles = iterator_to_array($handles); } @@ -85,7 +85,7 @@ final class PHUIHandleTagListView extends AphrontTagView { } if ($this->limit) { - if ($this->limit < count($this->handles)) { + if (count($this->handles) > $this->limit) { $tip_text = implode(', ', mpull($this->handles, 'getName')); $more = $this->newPlaceholderTag()