diff --git a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php index b5c0e2b816..b929d980d5 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php @@ -252,15 +252,30 @@ final class PhabricatorPeopleProfileViewController PhabricatorUser $user, $viewer) { - $query = new PhabricatorFeedQuery(); - $query->withFilterPHIDs( - array( - $user->getPHID(), - )); - $query->setLimit(100); - $query->setViewer($viewer); + $query = id(new PhabricatorFeedQuery()) + ->setViewer($viewer) + ->withFilterPHIDs(array($user->getPHID())) + ->setLimit(100) + ->setReturnPartialResultsOnOverheat(true); + $stories = $query->execute(); + $overheated_view = null; + $is_overheated = $query->getIsOverheated(); + if ($is_overheated) { + $overheated_message = + PhabricatorApplicationSearchController::newOverheatedError( + (bool)$stories); + + $overheated_view = id(new PHUIInfoView()) + ->setSeverity(PHUIInfoView::SEVERITY_WARNING) + ->setTitle(pht('Query Overheated')) + ->setErrors( + array( + $overheated_message, + )); + } + $builder = new PhabricatorFeedBuilder($stories); $builder->setUser($viewer); $builder->setShowHovercards(true); @@ -268,8 +283,10 @@ final class PhabricatorPeopleProfileViewController 'requires but just a single step.')); $view = $builder->buildView(); - return $view->render(); - + return array( + $overheated_view, + $view->render(), + ); } }