mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
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
This commit is contained in:
parent
5a604538ca
commit
86720b4595
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue