@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 references to legacy comment IDs

Summary:
Ref T2222. I want to stage a "later" patch to drop this column, but get rid of the last few references to it.

One of these methods has no callers, and the other stuff I've updated to use the modern fields.

Test Plan: Created some inlines, hit "edit", submitted them, `grep.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2222

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

+4 -21
+3 -2
src/applications/differential/controller/DifferentialInlineCommentEditController.php
··· 60 60 return false; 61 61 } 62 62 63 - // Saved comments may not be edited. 64 - if ($inline->getCommentID()) { 63 + // Saved comments may not be edited, for now, although the schema now 64 + // supports it. 65 + if (!$inline->isDraft()) { 65 66 return false; 66 67 } 67 68
-12
src/applications/differential/query/DifferentialInlineCommentQuery.php
··· 45 45 return $this; 46 46 } 47 47 48 - public function withCommentIDs(array $comment_ids) { 49 - $this->commentIDs = $comment_ids; 50 - return $this; 51 - } 52 - 53 48 public function execute() { 54 49 $table = new DifferentialTransactionComment(); 55 50 $conn_r = $table->establishConnection('r'); ··· 153 148 $conn_r, 154 149 'authorPHID IN (%Ls) AND transactionPHID IS NULL', 155 150 $this->draftsByAuthors); 156 - } 157 - 158 - if ($this->commentIDs) { 159 - $where[] = qsprintf( 160 - $conn_r, 161 - 'legacyCommentID IN (%Ld)', 162 - $this->commentIDs); 163 151 } 164 152 165 153 return $this->formatWhereClause($where);
+1 -7
src/applications/differential/storage/DifferentialInlineComment.php
··· 167 167 // the future transaction. 168 168 169 169 public function setCommentID($id) { 170 - $this->proxy->setLegacyCommentID($id); 171 170 $this->proxy->setTransactionPHID( 172 171 PhabricatorPHID::generateNewPHID( 173 172 PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST, 174 173 DifferentialPHIDTypeRevision::TYPECONST)); 175 174 return $this; 176 175 } 177 - 178 - public function getCommentID() { 179 - return $this->proxy->getLegacyCommentID(); 180 - } 181 - 182 176 183 177 /* -( PhabricatorMarkupInterface Implementation )-------------------------- */ 184 178 ··· 202 196 203 197 public function shouldUseMarkupCache($field) { 204 198 // Only cache submitted comments. 205 - return ($this->getID() && $this->getCommentID()); 199 + return ($this->getID() && !$this->isDraft()); 206 200 } 207 201 208 202 }