@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove some unused Releeph field methods

Summary: Ref T3718. Remove `bulkLoad()` and header-view rendering wrappers.

Test Plan: Viewed a request, looked the same. `grep`'d for stuff.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T3718

Differential Revision: https://secure.phabricator.com/D8809

+14 -59
+1 -13
src/applications/releeph/field/specification/ReleephAuthorFieldSpecification.php
··· 3 3 final class ReleephAuthorFieldSpecification 4 4 extends ReleephFieldSpecification { 5 5 6 - private static $authorMap = array(); 7 - 8 6 public function getFieldKey() { 9 7 return 'author'; 10 8 } 11 9 12 - public function bulkLoad(array $releeph_requests) { 13 - foreach ($releeph_requests as $releeph_request) { 14 - $commit = $releeph_request->loadPhabricatorRepositoryCommit(); 15 - if ($commit) { 16 - $author_phid = $commit->getAuthorPHID(); 17 - self::$authorMap[$releeph_request->getPHID()] = $author_phid; 18 - } 19 - } 20 - } 21 - 22 10 public function getName() { 23 11 return 'Author'; 24 12 } 25 13 26 - public function renderValueForHeaderView() { 14 + public function renderPropertyViewValue(array $handles) { 27 15 $pull = $this->getReleephRequest(); 28 16 $commit = $pull->loadPhabricatorRepositoryCommit(); 29 17 if (!$commit) {
+1 -1
src/applications/releeph/field/specification/ReleephBranchCommitFieldSpecification.php
··· 11 11 return 'Commit'; 12 12 } 13 13 14 - public function renderValueForHeaderView() { 14 + public function renderPropertyViewValue(array $handles) { 15 15 $rr = $this->getReleephRequest(); 16 16 if (!$rr->getInBranch()) { 17 17 return null;
+1 -1
src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php
··· 10 10 return pht('Depends On'); 11 11 } 12 12 13 - public function renderValueForHeaderView() { 13 + public function renderPropertyViewValue(array $handles) { 14 14 $revision_phids = $this->getDependentRevisionPHIDs(); 15 15 if (!$revision_phids) { 16 16 return null;
+1 -1
src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php
··· 16 16 return 'Churn'; 17 17 } 18 18 19 - public function renderValueForHeaderView() { 19 + public function renderPropertyViewValue(array $handles) { 20 20 $diff_rev = $this->getReleephRequest()->loadDifferentialRevision(); 21 21 if (!$diff_rev) { 22 22 return null;
+1 -5
src/applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php
··· 11 11 return 'Message'; 12 12 } 13 13 14 - public function renderLabelForHeaderView() { 15 - return null; 16 - } 17 - 18 14 public function getStyleForPropertyView() { 19 15 return 'block'; 20 16 } 21 17 22 - public function renderValueForHeaderView() { 18 + public function renderPropertyViewValue(array $handles) { 23 19 return phutil_tag( 24 20 'div', 25 21 array(
+1 -5
src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php
··· 1 1 <?php 2 2 3 - /** 4 - * While this class could take advantage of bulkLoad(), in practice 5 - * loadRelatives fixes all that for us. 6 - */ 7 3 final class ReleephDiffSizeFieldSpecification 8 4 extends ReleephFieldSpecification { 9 5 ··· 19 15 return 'Size'; 20 16 } 21 17 22 - public function renderValueForHeaderView() { 18 + public function renderPropertyViewValue(array $handles) { 23 19 $diff_rev = $this->getReleephRequest()->loadDifferentialRevision(); 24 20 if (!$diff_rev) { 25 21 return '';
+2 -23
src/applications/releeph/field/specification/ReleephFieldSpecification.php
··· 22 22 } 23 23 24 24 public function renderPropertyViewValue(array $handles) { 25 - $value = $this->renderValueForHeaderView(); 25 + $key = $this->getRequiredStorageKey(); 26 + $value = $this->getReleephRequest()->getDetail($key); 26 27 if ($value === '') { 27 28 return null; 28 29 } ··· 102 103 } 103 104 104 105 105 - /* -( Header View )-------------------------------------------------------- */ 106 - 107 - /** 108 - * Return a label for use in rendering the fields table. If you return null, 109 - * the renderLabelForHeaderView data will span both columns. 110 - */ 111 - public function renderLabelForHeaderView() { 112 - return $this->getName(); 113 - } 114 - 115 - public function renderValueForHeaderView() { 116 - $key = $this->getRequiredStorageKey(); 117 - return $this->getReleephRequest()->getDetail($key); 118 - } 119 - 120 - 121 106 /* -( Conduit )------------------------------------------------------------ */ 122 107 123 108 public function getKeyForConduit() { ··· 197 182 return $this->getViewer(); 198 183 } 199 184 return $this->user; 200 - } 201 - 202 - 203 - /* -( Bulk loading )------------------------------------------------------- */ 204 - 205 - public function bulkLoad(array $releeph_requests) { 206 185 } 207 186 208 187 /* -( Commit Messages )---------------------------------------------------- */
+1 -1
src/applications/releeph/field/specification/ReleephIntentFieldSpecification.php
··· 11 11 return 'Intent'; 12 12 } 13 13 14 - public function renderValueForHeaderView() { 14 + public function renderPropertyViewValue(array $handles) { 15 15 $pull = $this->getReleephRequest(); 16 16 17 17 $intents = $pull->getUserIntents();
+1 -1
src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php
··· 23 23 throw new PhabricatorCustomFieldImplementationIncompleteException($this); 24 24 } 25 25 26 - public function renderValueForHeaderView() { 26 + public function renderPropertyViewValue(array $handles) { 27 27 return $this->getNameForLevel($this->getValue()); 28 28 } 29 29
+1 -1
src/applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php
··· 11 11 return 'Commit'; 12 12 } 13 13 14 - public function renderValueForHeaderView() { 14 + public function renderPropertyViewValue(array $handles) { 15 15 $pull = $this->getReleephRequest(); 16 16 return $this->slowlyLoadHandle($pull->getRequestCommitPHID())->renderLink(); 17 17 }
+1 -5
src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php
··· 19 19 return 'block'; 20 20 } 21 21 22 - public function renderLabelForHeaderView() { 23 - return null; 24 - } 25 - 26 22 public function getIconForPropertyView() { 27 23 return PHUIPropertyListView::ICON_SUMMARY; 28 24 } 29 25 30 - public function renderValueForHeaderView() { 26 + public function renderPropertyViewValue(array $handles) { 31 27 return phutil_tag( 32 28 'div', 33 29 array(
+1 -1
src/applications/releeph/field/specification/ReleephRequestorFieldSpecification.php
··· 11 11 return 'Requestor'; 12 12 } 13 13 14 - public function renderValueForHeaderView() { 14 + public function renderPropertyViewValue(array $handles) { 15 15 $phid = $this->getReleephRequest()->getRequestUserPHID(); 16 16 $handle = id(new PhabricatorHandleQuery()) 17 17 ->setViewer($this->getUser())
+1 -1
src/applications/releeph/field/specification/ReleephRevisionFieldSpecification.php
··· 11 11 return 'Revision'; 12 12 } 13 13 14 - public function renderValueForHeaderView() { 14 + public function renderPropertyViewValue(array $handles) { 15 15 $phid = $this 16 16 ->getReleephRequest() 17 17 ->loadRequestCommitDiffPHID();