Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15381401
D15151.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D15151.diff
View Options
diff --git a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
--- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
+++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
@@ -112,7 +112,7 @@
PhabricatorCustomField::ROLE_VIEW);
$field_list->appendFieldsToPropertyList($user, $viewer, $view);
- if ($view->isEmpty()) {
+ if (!$view->hasAnyProperties()) {
return null;
}
diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php
--- a/src/applications/project/controller/PhabricatorProjectProfileController.php
+++ b/src/applications/project/controller/PhabricatorProjectProfileController.php
@@ -125,7 +125,7 @@
PhabricatorCustomField::ROLE_VIEW);
$field_list->appendFieldsToPropertyList($project, $viewer, $view);
- if ($view->isEmpty()) {
+ if (!$view->hasAnyProperties()) {
return null;
}
diff --git a/src/applications/project/view/ProjectBoardTaskCard.php b/src/applications/project/view/ProjectBoardTaskCard.php
--- a/src/applications/project/view/ProjectBoardTaskCard.php
+++ b/src/applications/project/view/ProjectBoardTaskCard.php
@@ -86,12 +86,11 @@
$project_phids = array_fuse($task->getProjectPHIDs());
unset($project_phids[$this->project->getPHID()]);
- $handle_list = $viewer->loadHandles($project_phids);
- $tag_list = id(new PHUIHandleTagListView())
- ->setSlim(true)
- ->setHandles($handle_list);
-
- if (!$tag_list->isEmpty()) {
+ if ($project_phids) {
+ $handle_list = $viewer->loadHandles($project_phids);
+ $tag_list = id(new PHUIHandleTagListView())
+ ->setSlim(true)
+ ->setHandles($handle_list);
$card->addAttribute($tag_list);
}
diff --git a/src/view/AphrontTagView.php b/src/view/AphrontTagView.php
--- a/src/view/AphrontTagView.php
+++ b/src/view/AphrontTagView.php
@@ -77,10 +77,6 @@
return $this->id;
}
- public function isEmpty() {
- return empty($this->getTagContent());
- }
-
protected function getTagName() {
return 'div';
}
diff --git a/src/view/phui/PHUIPropertyListView.php b/src/view/phui/PHUIPropertyListView.php
--- a/src/view/phui/PHUIPropertyListView.php
+++ b/src/view/phui/PHUIPropertyListView.php
@@ -115,14 +115,14 @@
$this->invokedWillRenderEvent = true;
}
- public function isEmpty() {
+ public function hasAnyProperties() {
$this->invokeWillRenderEvent();
if ($this->parts) {
- return false;
+ return true;
}
- return true;
+ return false;
}
public function render() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 7:27 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7456691
Default Alt Text
D15151.diff (2 KB)
Attached To
Mode
D15151: Disambiguate isEmpty()
Attached
Detach File
Event Timeline
Log In to Comment