Differential D17300 Diff 42245 src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | private function loadPHIDsByTypes($type) { | ||||
$normalized_type = phutil_utf8_strtolower($type); | $normalized_type = phutil_utf8_strtolower($type); | ||||
$matches = array(); | $matches = array(); | ||||
foreach ($objects as $object) { | foreach ($objects as $object) { | ||||
$object_class = get_class($object); | $object_class = get_class($object); | ||||
$normalized_class = phutil_utf8_strtolower($object_class); | $normalized_class = phutil_utf8_strtolower($object_class); | ||||
if ($normalized_class === $normalized_type) { | |||||
$matches = array($object_class => $object); | |||||
break; | |||||
} | |||||
if (!strlen($type) || | if (!strlen($type) || | ||||
strpos($normalized_class, $normalized_type) !== false) { | strpos($normalized_class, $normalized_type) !== false) { | ||||
$matches[$object_class] = $object; | $matches[$object_class] = $object; | ||||
} | } | ||||
} | } | ||||
if (!$matches) { | if (!$matches) { | ||||
$all_types = array(); | $all_types = array(); | ||||
foreach ($objects as $object) { | foreach ($objects as $object) { | ||||
$all_types[] = get_class($object); | $all_types[] = get_class($object); | ||||
} | } | ||||
Show All 31 Lines |