Differential D21226 Diff 50562 src/infrastructure/diff/view/PHUIDiffInlineCommentPreviewListView.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/diff/view/PHUIDiffInlineCommentPreviewListView.php
| Show All 32 Lines | $config = array( | ||||
| 'view' => pht('View'), | 'view' => pht('View'), | ||||
| ), | ), | ||||
| ); | ); | ||||
| Javelin::initBehavior('diff-preview-link', $config); | Javelin::initBehavior('diff-preview-link', $config); | ||||
| $inlines = $this->getInlineComments(); | $inlines = $this->getInlineComments(); | ||||
| foreach ($inlines as $key => $inline) { | foreach ($inlines as $key => $inline) { | ||||
| // TODO: This is real, real gross. | $inlines[$key] = $inline->newInlineCommentObject(); | ||||
| if ($inline instanceof DifferentialTransactionComment) { | |||||
| $inlines[$key] = DifferentialInlineComment::newFromModernComment( | |||||
| $inline); | |||||
| } else { | |||||
| $inlines[$key] = PhabricatorAuditInlineComment::newFromModernComment( | |||||
| $inline); | |||||
| } | |||||
| } | } | ||||
| $engine = new PhabricatorMarkupEngine(); | $engine = new PhabricatorMarkupEngine(); | ||||
| $engine->setViewer($viewer); | $engine->setViewer($viewer); | ||||
| foreach ($inlines as $inline) { | foreach ($inlines as $inline) { | ||||
| $engine->addObject( | $engine->addObject( | ||||
| $inline, | $inline, | ||||
| PhabricatorInlineComment::MARKUP_FIELD_BODY); | PhabricatorInlineComment::MARKUP_FIELD_BODY); | ||||
| Show All 25 Lines | |||||