Move lint/unit test warning code forward to Transactions
Summary: Ref T2222. Makes the "lint/unit errors" warnings work again. Test Plan: Viewed some revisions with and without these warnings. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2222 Differential Revision: https://secure.phabricator.com/D8475
This commit is contained in:
@@ -336,6 +336,19 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||
$comment_form = new DifferentialAddCommentView();
|
||||
$comment_form->setRevision($revision);
|
||||
|
||||
$review_warnings = array();
|
||||
foreach ($field_list->getFields() as $field) {
|
||||
$review_warnings[] = $field->getWarningsForDetailView();
|
||||
}
|
||||
$review_warnings = array_mergev($review_warnings);
|
||||
|
||||
if ($review_warnings) {
|
||||
$review_warnings_panel = id(new AphrontErrorView())
|
||||
->setSeverity(AphrontErrorView::SEVERITY_WARNING)
|
||||
->setErrors($review_warnings);
|
||||
$comment_form->setErrorView($review_warnings_panel);
|
||||
}
|
||||
|
||||
// TODO: Restore the ability for fields to add accept warnings.
|
||||
|
||||
$comment_form->setActions($this->getRevisionCommentActions($revision));
|
||||
|
||||
Reference in New Issue
Block a user