Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | protected function renderResultList( | ||||
$policy_objects = ConpherenceThread::loadViewPolicyObjects( | $policy_objects = ConpherenceThread::loadViewPolicyObjects( | ||||
$viewer, | $viewer, | ||||
$conpherences); | $conpherences); | ||||
$engines = array(); | $engines = array(); | ||||
$fulltext = $query->getParameter('fulltext'); | $fulltext = $query->getParameter('fulltext'); | ||||
if (strlen($fulltext) && $conpherences) { | if ($fulltext !== null && strlen($fulltext) && $conpherences) { | ||||
$context = $this->loadContextMessages($conpherences, $fulltext); | $context = $this->loadContextMessages($conpherences, $fulltext); | ||||
$author_phids = array(); | $author_phids = array(); | ||||
foreach ($context as $phid => $messages) { | foreach ($context as $phid => $messages) { | ||||
$conpherence = $conpherences[$phid]; | $conpherence = $conpherences[$phid]; | ||||
$engine = id(new PhabricatorMarkupEngine()) | $engine = id(new PhabricatorMarkupEngine()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
Show All 28 Lines | foreach ($conpherences as $conpherence_phid => $conpherence) { | ||||
$created = phabricator_date($conpherence->getDateCreated(), $viewer); | $created = phabricator_date($conpherence->getDateCreated(), $viewer); | ||||
$title = $conpherence->getTitle(); | $title = $conpherence->getTitle(); | ||||
$monogram = $conpherence->getMonogram(); | $monogram = $conpherence->getMonogram(); | ||||
$icon_name = $conpherence->getPolicyIconName($policy_objects); | $icon_name = $conpherence->getPolicyIconName($policy_objects); | ||||
$icon = id(new PHUIIconView()) | $icon = id(new PHUIIconView()) | ||||
->setIcon($icon_name); | ->setIcon($icon_name); | ||||
if (!strlen($fulltext)) { | if ($fulltext === null || !strlen($fulltext)) { | ||||
$item = id(new PHUIObjectItemView()) | $item = id(new PHUIObjectItemView()) | ||||
->setObjectName($conpherence->getMonogram()) | ->setObjectName($conpherence->getMonogram()) | ||||
->setHeader($title) | ->setHeader($title) | ||||
->setHref('/'.$conpherence->getMonogram()) | ->setHref('/'.$conpherence->getMonogram()) | ||||
->setObject($conpherence) | ->setObject($conpherence) | ||||
->setImageURI($conpherence->getProfileImageURI()) | ->setImageURI($conpherence->getProfileImageURI()) | ||||
->addIcon('none', $created) | ->addIcon('none', $created) | ||||
->addIcon( | ->addIcon( | ||||
▲ Show 20 Lines • Show All 283 Lines • Show Last 20 Lines |