1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 00:32:42 +01:00

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
This commit is contained in:
epriestley 2014-02-14 15:56:25 -08:00
parent e18b161464
commit 04ba976a04
3 changed files with 4 additions and 21 deletions

View file

@ -60,8 +60,9 @@ final class DifferentialInlineCommentEditController
return false;
}
// Saved comments may not be edited.
if ($inline->getCommentID()) {
// Saved comments may not be edited, for now, although the schema now
// supports it.
if (!$inline->isDraft()) {
return false;
}

View file

@ -45,11 +45,6 @@ final class DifferentialInlineCommentQuery
return $this;
}
public function withCommentIDs(array $comment_ids) {
$this->commentIDs = $comment_ids;
return $this;
}
public function execute() {
$table = new DifferentialTransactionComment();
$conn_r = $table->establishConnection('r');
@ -155,13 +150,6 @@ final class DifferentialInlineCommentQuery
$this->draftsByAuthors);
}
if ($this->commentIDs) {
$where[] = qsprintf(
$conn_r,
'legacyCommentID IN (%Ld)',
$this->commentIDs);
}
return $this->formatWhereClause($where);
}

View file

@ -167,7 +167,6 @@ final class DifferentialInlineComment
// the future transaction.
public function setCommentID($id) {
$this->proxy->setLegacyCommentID($id);
$this->proxy->setTransactionPHID(
PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
@ -175,11 +174,6 @@ final class DifferentialInlineComment
return $this;
}
public function getCommentID() {
return $this->proxy->getLegacyCommentID();
}
/* -( PhabricatorMarkupInterface Implementation )-------------------------- */
@ -202,7 +196,7 @@ final class DifferentialInlineComment
public function shouldUseMarkupCache($field) {
// Only cache submitted comments.
return ($this->getID() && $this->getCommentID());
return ($this->getID() && !$this->isDraft());
}
}