Define common ID and PHID export fields in SearchEngine
Summary: Ref T13049. All exportable objects should always have these fields, so make them builtins. This also sets things up for extensions (like custom fields). Test Plan: Exported user data, got the same export as before. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13049 Differential Revision: https://secure.phabricator.com/D18951
This commit is contained in:
@@ -449,18 +449,7 @@ final class PhabricatorApplicationSearchController
|
||||
$format->setViewer($viewer);
|
||||
|
||||
$export_data = $engine->newExport($objects);
|
||||
|
||||
if (count($export_data) !== count($objects)) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Search engine exported the wrong number of objects, expected '.
|
||||
'%s but got %s.',
|
||||
phutil_count($objects),
|
||||
phutil_count($export_data)));
|
||||
}
|
||||
|
||||
$objects = array_values($objects);
|
||||
$export_data = array_values($export_data);
|
||||
|
||||
$field_list = $engine->newExportFieldList();
|
||||
$field_list = mpull($field_list, null, 'getKey');
|
||||
|
||||
Reference in New Issue
Block a user