@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 "DiffusionTagTableView"

Summary: Ref T13552. This older class has no callers; tag and branch listings were replaced with an "ObjectList" view.

Test Plan: Grepped for "DiffusionTagTableView", got no hits.

Maniphest Tasks: T13552

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

-142
-2
src/__phutil_library_map__.php
··· 1063 1063 'DiffusionSyncLogSearchEngine' => 'applications/diffusion/query/DiffusionSyncLogSearchEngine.php', 1064 1064 'DiffusionTagListController' => 'applications/diffusion/controller/DiffusionTagListController.php', 1065 1065 'DiffusionTagListView' => 'applications/diffusion/view/DiffusionTagListView.php', 1066 - 'DiffusionTagTableView' => 'applications/diffusion/view/DiffusionTagTableView.php', 1067 1066 'DiffusionTaggedRepositoriesFunctionDatasource' => 'applications/diffusion/typeahead/DiffusionTaggedRepositoriesFunctionDatasource.php', 1068 1067 'DiffusionTagsQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionTagsQueryConduitAPIMethod.php', 1069 1068 'DiffusionURIEditConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionURIEditConduitAPIMethod.php', ··· 7157 7156 'DiffusionSyncLogSearchEngine' => 'PhabricatorApplicationSearchEngine', 7158 7157 'DiffusionTagListController' => 'DiffusionController', 7159 7158 'DiffusionTagListView' => 'DiffusionView', 7160 - 'DiffusionTagTableView' => 'DiffusionView', 7161 7159 'DiffusionTaggedRepositoriesFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 7162 7160 'DiffusionTagsQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod', 7163 7161 'DiffusionURIEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
-140
src/applications/diffusion/view/DiffusionTagTableView.php
··· 1 - <?php 2 - 3 - final class DiffusionTagTableView extends DiffusionView { 4 - 5 - private $tags; 6 - private $commits = array(); 7 - private $handles = array(); 8 - 9 - public function setTags($tags) { 10 - $this->tags = $tags; 11 - return $this; 12 - } 13 - 14 - public function setCommits(array $commits) { 15 - $this->commits = mpull($commits, null, 'getCommitIdentifier'); 16 - return $this; 17 - } 18 - 19 - public function setHandles(array $handles) { 20 - $this->handles = $handles; 21 - return $this; 22 - } 23 - 24 - public function getRequiredHandlePHIDs() { 25 - return array_filter(mpull($this->commits, 'getAuthorPHID')); 26 - } 27 - 28 - public function render() { 29 - $drequest = $this->getDiffusionRequest(); 30 - $repository = $drequest->getRepository(); 31 - $viewer = $this->getViewer(); 32 - 33 - $buildables = $this->loadBuildables($this->commits); 34 - $has_builds = false; 35 - 36 - $rows = array(); 37 - foreach ($this->tags as $tag) { 38 - $commit = idx($this->commits, $tag->getCommitIdentifier()); 39 - 40 - $tag_link = phutil_tag( 41 - 'a', 42 - array( 43 - 'href' => $drequest->generateURI( 44 - array( 45 - 'action' => 'browse', 46 - 'commit' => $tag->getName(), 47 - )), 48 - ), 49 - $tag->getName()); 50 - 51 - $commit_link = phutil_tag( 52 - 'a', 53 - array( 54 - 'href' => $drequest->generateURI( 55 - array( 56 - 'action' => 'commit', 57 - 'commit' => $tag->getCommitIdentifier(), 58 - )), 59 - ), 60 - $repository->formatCommitName( 61 - $tag->getCommitIdentifier())); 62 - 63 - $author = null; 64 - if ($commit && $commit->getAuthorPHID()) { 65 - $author = $this->handles[$commit->getAuthorPHID()]->renderLink(); 66 - } else if ($commit && $commit->getCommitData()) { 67 - $author = self::renderName($commit->getCommitData()->getAuthorName()); 68 - } else { 69 - $author = self::renderName($tag->getAuthor()); 70 - } 71 - 72 - $description = null; 73 - if ($tag->getType() == 'git/tag') { 74 - // In Git, a tag may be a "real" tag, or just a reference to a commit. 75 - // If it's a real tag, use the message on the tag, since this may be 76 - // unique data which isn't otherwise available. 77 - $description = $tag->getDescription(); 78 - } else { 79 - if ($commit) { 80 - $description = $commit->getSummary(); 81 - } else { 82 - $description = $tag->getDescription(); 83 - } 84 - } 85 - 86 - $build = null; 87 - if ($commit) { 88 - $buildable = idx($buildables, $commit->getPHID()); 89 - if ($buildable) { 90 - $build = $this->renderBuildable($buildable); 91 - $has_builds = true; 92 - } 93 - } 94 - 95 - $history = $this->linkTagHistory($tag->getName()); 96 - 97 - $rows[] = array( 98 - $history, 99 - $tag_link, 100 - $commit_link, 101 - $build, 102 - $author, 103 - $description, 104 - $viewer->formatShortDateTime($tag->getEpoch()), 105 - ); 106 - } 107 - 108 - $table = id(new AphrontTableView($rows)) 109 - ->setHeaders( 110 - array( 111 - null, 112 - pht('Tag'), 113 - pht('Commit'), 114 - null, 115 - pht('Author'), 116 - pht('Description'), 117 - pht('Created'), 118 - )) 119 - ->setColumnClasses( 120 - array( 121 - 'nudgeright', 122 - 'pri', 123 - '', 124 - '', 125 - '', 126 - 'wide', 127 - 'right', 128 - )) 129 - ->setColumnVisibility( 130 - array( 131 - true, 132 - true, 133 - true, 134 - $has_builds, 135 - )); 136 - 137 - return $table->render(); 138 - } 139 - 140 - }