Summary: Ref T13513. Take another step toward coherent query pathways for inlines. Test Plan: - Created, previewed, and submitted inlines in Diffusion. - Got a (mostly) appropriate draft state. - Got proper comment peristence, preview behavior, and submission behavior. Maniphest Tasks: T13513 Differential Revision: https://secure.phabricator.com/D21229
20 lines
425 B
PHP
20 lines
425 B
PHP
<?php
|
|
|
|
final class DiffusionCommitDraftEngine
|
|
extends PhabricatorDraftEngine {
|
|
|
|
protected function hasCustomDraftContent() {
|
|
$viewer = $this->getViewer();
|
|
$commit = $this->getObject();
|
|
|
|
$inlines = id(new DiffusionDiffInlineCommentQuery())
|
|
->setViewer($viewer)
|
|
->withCommitPHIDs(array($commit->getPHID()))
|
|
->withPublishableComments(true)
|
|
->execute();
|
|
|
|
return (bool)$inlines;
|
|
}
|
|
|
|
}
|