From 8f3ec9d9772868909b45e9119e8f84c38a756721 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 3 Apr 2013 14:20:39 -0700 Subject: [PATCH] Enable hovercard controller to send ajax ready responses Summary: Refs T1048 - Resolves the TODO Test Plan: Used in a future diff. Used JX.log to verify JSON format and correct gibberish HTML output of input (I will never understand how browsers can be so evil and ignore `Content-Type`). Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1048 Differential Revision: https://secure.phabricator.com/D5557 --- .../controller/PhabricatorSearchHovercardController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/applications/search/controller/PhabricatorSearchHovercardController.php b/src/applications/search/controller/PhabricatorSearchHovercardController.php index a8cde4da8e..bff7604451 100644 --- a/src/applications/search/controller/PhabricatorSearchHovercardController.php +++ b/src/applications/search/controller/PhabricatorSearchHovercardController.php @@ -54,10 +54,12 @@ final class PhabricatorSearchHovercardController array( 'dust' => true, )); + } else { + return id(new AphrontAjaxResponse())->setContent( + array( + 'cards' => $cards, + )); } - - // TODO: Write a reasonable way to provide client-side-ready hovercard - // put-into-the-browser markup (coming in the next diff) } }