1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

Fix searching for commits

Summary:
fix two issues. First is that the field in the query is not
correct; the other is to make indexing handle deleted repository.

Test Plan: indexed some commits and the search result looks correct.
Reviewed By: epriestley
Reviewers: epriestley, tuomaspelkonen
CC: aran, epriestley
Differential Revision: 633
This commit is contained in:
Jason Ge 2011-07-09 16:08:39 -07:00
parent d665268074
commit 30733ca575
2 changed files with 5 additions and 1 deletions

View file

@ -52,7 +52,7 @@ class PhabricatorObjectHandleData {
if ($commits) {
$data_dao = newv('PhabricatorRepositoryCommitData', array());
$commit_data = $data_dao->loadAllWhere(
'id IN (%Ld)',
'commitID IN (%Ld)',
mpull($commits, 'getID'));
$commit_data = mpull($commit_data, null, 'getCommitID');
}

View file

@ -31,6 +31,10 @@ class PhabricatorSearchCommitIndexer
'id = %d',
$commit->getRepositoryID());
if (!$repository) {
return;
}
$title = 'r'.$repository->getCallsign().$commit->getCommitIdentifier().
" ".$commit_data->getSummary();