Page MenuHomePhorge

D25753.1731170984.diff
No OneTemporary

D25753.1731170984.diff

diff --git a/src/applications/differential/controller/DifferentialInlineCommentEditController.php b/src/applications/differential/controller/DifferentialInlineCommentEditController.php
--- a/src/applications/differential/controller/DifferentialInlineCommentEditController.php
+++ b/src/applications/differential/controller/DifferentialInlineCommentEditController.php
@@ -120,7 +120,9 @@
protected function canEditInlineComment(
PhabricatorUser $viewer,
- DifferentialInlineComment $inline) {
+ PhabricatorInlineComment $inline) {
+
+ assert($inline instanceof DifferentialInlineComment);
// Only the author may edit a comment.
if ($inline->getAuthorPHID() != $viewer->getPHID()) {
diff --git a/src/applications/diffusion/controller/DiffusionInlineCommentController.php b/src/applications/diffusion/controller/DiffusionInlineCommentController.php
--- a/src/applications/diffusion/controller/DiffusionInlineCommentController.php
+++ b/src/applications/diffusion/controller/DiffusionInlineCommentController.php
@@ -87,7 +87,9 @@
protected function canEditInlineComment(
PhabricatorUser $viewer,
- PhabricatorAuditInlineComment $inline) {
+ PhabricatorInlineComment $inline) {
+
+ assert($inline instanceof PhabricatorAuditInlineComment);
// Only the author may edit a comment.
if ($inline->getAuthorPHID() != $viewer->getPHID()) {
diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php
--- a/src/infrastructure/diff/PhabricatorInlineCommentController.php
+++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php
@@ -11,6 +11,8 @@
abstract protected function loadObjectOwnerPHID(
PhabricatorInlineComment $inline);
abstract protected function newContainerObject();
+ abstract protected function canEditInlineComment(
+ PhabricatorUser $viewer, PhabricatorInlineComment $inline);
final protected function getContainerObject() {
if ($this->containerObject === null) {

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 16:49 (18 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
963262
Default Alt Text
D25753.1731170984.diff (2 KB)

Event Timeline