1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Improve search/phid flexibility.

This commit is contained in:
epriestley 2011-03-21 23:37:05 -07:00
parent e1d68e852a
commit 2eb30aed9e
3 changed files with 22 additions and 2 deletions

View file

@ -34,6 +34,8 @@ class PhabricatorObjectHandleData {
$handles = array();
$external_loaders = PhabricatorEnv::getEnvConfig('phid.external-loaders');
foreach ($types as $type => $phids) {
switch ($type) {
case PhabricatorPHIDConstants::PHID_TYPE_MAGIC:
@ -200,6 +202,20 @@ class PhabricatorObjectHandleData {
}
break;
default:
$loader = null;
if (isset($external_loaders[$type])) {
$loader = $external_loaders[$type];
} else if (isset($external_loaders['*'])) {
$loader = $external_loaders['*'];
}
if ($loader) {
PhutilSymbolLoader::loadClass($loader);
$object = newv($loader, array());
$handles += $object->loadHandles($phids);
break;
}
foreach ($phids as $phid) {
$handle = new PhabricatorObjectHandle();
$handle->setType($type);

View file

@ -30,7 +30,9 @@ class PhabricatorRepositorySvnCommitMessageParserWorker
$uri,
$commit->getCommitIdentifier());
// TODO: Need to slam UTF8.
// Subversion may send us back commit messages which won't parse because
// they have non UTF-8 garbage in them. Slam them into valid UTF-8.
$xml = phutil_utf8ize($xml);
$log = new SimpleXMLElement($xml);
$entry = $log->logentry[0];

View file

@ -65,11 +65,13 @@ class PhabricatorSearchController extends PhabricatorSearchBaseController {
}
}
$more = PhabricatorEnv::getEnvConfig('search.more-document-types', array());
$options = array(
'' => 'All Documents',
PhabricatorPHIDConstants::PHID_TYPE_DREV => 'Differential Revisions',
PhabricatorPHIDConstants::PHID_TYPE_TASK => 'Maniphest Tasks',
);
) + $more;
$status_options = array(
0 => 'Open and Closed Documents',