diff --git a/src/applications/phid/controller/PhabricatorPHIDLookupController.php b/src/applications/phid/controller/PhabricatorPHIDLookupController.php index 71330b78ba..f835308395 100644 --- a/src/applications/phid/controller/PhabricatorPHIDLookupController.php +++ b/src/applications/phid/controller/PhabricatorPHIDLookupController.php @@ -22,59 +22,57 @@ final class PhabricatorPHIDLookupController public function processRequest() { $request = $this->getRequest(); - if ($request->isFormPost()) { - $phids = $request->getStrList('phids'); - if ($phids) { - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $phids = $request->getStrList('phids'); + if ($phids) { + $handles = id(new PhabricatorObjectHandleData($phids)) + ->loadHandles(); - $rows = array(); - foreach ($handles as $handle) { - if ($handle->getURI()) { - $link = phutil_render_tag( - 'a', - array( - 'href' => $handle->getURI(), - ), - phutil_escape_html($handle->getURI())); - } else { - $link = null; - } - - $rows[] = array( - phutil_escape_html($handle->getPHID()), - phutil_escape_html($handle->getType()), - phutil_escape_html($handle->getName()), - $link, - ); + $rows = array(); + foreach ($handles as $handle) { + if ($handle->getURI()) { + $link = phutil_render_tag( + 'a', + array( + 'href' => $handle->getURI(), + ), + phutil_escape_html($handle->getURI())); + } else { + $link = null; } - $table = new AphrontTableView($rows); - $table->setHeaders( - array( - 'PHID', - 'Type', - 'Name', - 'URI', - )); - $table->setColumnClasses( - array( - null, - null, - null, - 'wide', - )); - - $panel = new AphrontPanelView(); - $panel->setHeader('PHID Handles'); - $panel->appendChild($table); - - return $this->buildStandardPageResponse( - $panel, - array( - 'title' => 'PHID Lookup Results', - )); + $rows[] = array( + phutil_escape_html($handle->getPHID()), + phutil_escape_html($handle->getType()), + phutil_escape_html($handle->getName()), + $link, + ); } + + $table = new AphrontTableView($rows); + $table->setHeaders( + array( + 'PHID', + 'Type', + 'Name', + 'URI', + )); + $table->setColumnClasses( + array( + null, + null, + null, + 'wide', + )); + + $panel = new AphrontPanelView(); + $panel->setHeader('PHID Handles'); + $panel->appendChild($table); + + return $this->buildStandardPageResponse( + $panel, + array( + 'title' => 'PHID Lookup Results', + )); } $lookup_form = new AphrontFormView();