Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13982446
D8809.id20908.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
9 KB
Referenced Files
None
Subscribers
None
D8809.id20908.diff
View Options
diff --git a/src/applications/releeph/field/specification/ReleephAuthorFieldSpecification.php b/src/applications/releeph/field/specification/ReleephAuthorFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephAuthorFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephAuthorFieldSpecification.php
@@ -3,27 +3,15 @@
final class ReleephAuthorFieldSpecification
extends ReleephFieldSpecification {
- private static $authorMap = array();
-
public function getFieldKey() {
return 'author';
}
- public function bulkLoad(array $releeph_requests) {
- foreach ($releeph_requests as $releeph_request) {
- $commit = $releeph_request->loadPhabricatorRepositoryCommit();
- if ($commit) {
- $author_phid = $commit->getAuthorPHID();
- self::$authorMap[$releeph_request->getPHID()] = $author_phid;
- }
- }
- }
-
public function getName() {
return 'Author';
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
$pull = $this->getReleephRequest();
$commit = $pull->loadPhabricatorRepositoryCommit();
if (!$commit) {
diff --git a/src/applications/releeph/field/specification/ReleephBranchCommitFieldSpecification.php b/src/applications/releeph/field/specification/ReleephBranchCommitFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephBranchCommitFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephBranchCommitFieldSpecification.php
@@ -11,7 +11,7 @@
return 'Commit';
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
$rr = $this->getReleephRequest();
if (!$rr->getInBranch()) {
return null;
diff --git a/src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php b/src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php
@@ -10,7 +10,7 @@
return pht('Depends On');
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
$revision_phids = $this->getDependentRevisionPHIDs();
if (!$revision_phids) {
return null;
diff --git a/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php b/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php
@@ -16,7 +16,7 @@
return 'Churn';
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
$diff_rev = $this->getReleephRequest()->loadDifferentialRevision();
if (!$diff_rev) {
return null;
diff --git a/src/applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php b/src/applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php
@@ -11,15 +11,11 @@
return 'Message';
}
- public function renderLabelForHeaderView() {
- return null;
- }
-
public function getStyleForPropertyView() {
return 'block';
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
return phutil_tag(
'div',
array(
diff --git a/src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php b/src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php
@@ -1,9 +1,5 @@
<?php
-/**
- * While this class could take advantage of bulkLoad(), in practice
- * loadRelatives fixes all that for us.
- */
final class ReleephDiffSizeFieldSpecification
extends ReleephFieldSpecification {
@@ -19,7 +15,7 @@
return 'Size';
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
$diff_rev = $this->getReleephRequest()->loadDifferentialRevision();
if (!$diff_rev) {
return '';
diff --git a/src/applications/releeph/field/specification/ReleephFieldSpecification.php b/src/applications/releeph/field/specification/ReleephFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephFieldSpecification.php
@@ -22,7 +22,8 @@
}
public function renderPropertyViewValue(array $handles) {
- $value = $this->renderValueForHeaderView();
+ $key = $this->getRequiredStorageKey();
+ $value = $this->getReleephRequest()->getDetail($key);
if ($value === '') {
return null;
}
@@ -102,22 +103,6 @@
}
-/* -( Header View )-------------------------------------------------------- */
-
- /**
- * Return a label for use in rendering the fields table. If you return null,
- * the renderLabelForHeaderView data will span both columns.
- */
- public function renderLabelForHeaderView() {
- return $this->getName();
- }
-
- public function renderValueForHeaderView() {
- $key = $this->getRequiredStorageKey();
- return $this->getReleephRequest()->getDetail($key);
- }
-
-
/* -( Conduit )------------------------------------------------------------ */
public function getKeyForConduit() {
@@ -199,12 +184,6 @@
return $this->user;
}
-
-/* -( Bulk loading )------------------------------------------------------- */
-
- public function bulkLoad(array $releeph_requests) {
- }
-
/* -( Commit Messages )---------------------------------------------------- */
public function shouldAppearOnCommitMessage() {
diff --git a/src/applications/releeph/field/specification/ReleephIntentFieldSpecification.php b/src/applications/releeph/field/specification/ReleephIntentFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephIntentFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephIntentFieldSpecification.php
@@ -11,7 +11,7 @@
return 'Intent';
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
$pull = $this->getReleephRequest();
$intents = $pull->getUserIntents();
diff --git a/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php b/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php
@@ -23,7 +23,7 @@
throw new PhabricatorCustomFieldImplementationIncompleteException($this);
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
return $this->getNameForLevel($this->getValue());
}
diff --git a/src/applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php b/src/applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php
@@ -11,7 +11,7 @@
return 'Commit';
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
$pull = $this->getReleephRequest();
return $this->slowlyLoadHandle($pull->getRequestCommitPHID())->renderLink();
}
diff --git a/src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php b/src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php
@@ -19,15 +19,11 @@
return 'block';
}
- public function renderLabelForHeaderView() {
- return null;
- }
-
public function getIconForPropertyView() {
return PHUIPropertyListView::ICON_SUMMARY;
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
return phutil_tag(
'div',
array(
diff --git a/src/applications/releeph/field/specification/ReleephRequestorFieldSpecification.php b/src/applications/releeph/field/specification/ReleephRequestorFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephRequestorFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephRequestorFieldSpecification.php
@@ -11,7 +11,7 @@
return 'Requestor';
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
$phid = $this->getReleephRequest()->getRequestUserPHID();
$handle = id(new PhabricatorHandleQuery())
->setViewer($this->getUser())
diff --git a/src/applications/releeph/field/specification/ReleephRevisionFieldSpecification.php b/src/applications/releeph/field/specification/ReleephRevisionFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephRevisionFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephRevisionFieldSpecification.php
@@ -11,7 +11,7 @@
return 'Revision';
}
- public function renderValueForHeaderView() {
+ public function renderPropertyViewValue(array $handles) {
$phid = $this
->getReleephRequest()
->loadRequestCommitDiffPHID();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 20, 11:21 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719353
Default Alt Text
D8809.id20908.diff (9 KB)
Attached To
Mode
D8809: Remove some unused Releeph field methods
Attached
Detach File
Event Timeline
Log In to Comment