Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionSymbolController.php
| Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | protected function processDiffusionRequest(AphrontRequest $request) { | ||||
| if ($request->getStr('type')) { | if ($request->getStr('type')) { | ||||
| $external_query->withTypes(array($request->getStr('type'))); | $external_query->withTypes(array($request->getStr('type'))); | ||||
| } | } | ||||
| if ($request->getStr('lang')) { | if ($request->getStr('lang')) { | ||||
| $external_query->withLanguages(array($request->getStr('lang'))); | $external_query->withLanguages(array($request->getStr('lang'))); | ||||
| } | } | ||||
| $external_sources = id(new PhutilSymbolLoader()) | $external_sources = id(new PhutilClassMapQuery()) | ||||
| ->setAncestorClass('DiffusionExternalSymbolsSource') | ->setAncestorClass('DiffusionExternalSymbolsSource') | ||||
| ->loadObjects(); | ->execute(); | ||||
| $results = array($symbols); | $results = array($symbols); | ||||
| foreach ($external_sources as $source) { | foreach ($external_sources as $source) { | ||||
| $results[] = $source->executeQuery($external_query); | $results[] = $source->executeQuery($external_query); | ||||
| } | } | ||||
| $symbols = array_mergev($results); | $symbols = array_mergev($results); | ||||
| if ($request->getBool('jump') && count($symbols) == 1) { | if ($request->getBool('jump') && count($symbols) == 1) { | ||||
| // If this is a clickthrough from Differential, just jump them | // If this is a clickthrough from Differential, just jump them | ||||
| ▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines | |||||