mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Index revision comments
Summary: Only inlines were indexed (contrary to what comment claims). Test Plan: Index one revision, check database. Reviewers: epriestley Reviewed By: epriestley CC: aran, Koolvin Differential Revision: https://secure.phabricator.com/D2359
This commit is contained in:
parent
f04d8ab1a7
commit
b916722151
2 changed files with 8 additions and 4 deletions
|
@ -52,15 +52,18 @@ final class PhabricatorSearchDifferentialIndexer
|
|||
time());
|
||||
}
|
||||
|
||||
$comments = id(new DifferentialInlineComment())->loadAllWhere(
|
||||
'revisionID = %d AND commentID is not null',
|
||||
$comments = id(new DifferentialComment())->loadAllWhere(
|
||||
'revisionID = %d',
|
||||
$rev->getID());
|
||||
|
||||
$inlines = id(new DifferentialInlineComment())->loadAllWhere(
|
||||
'revisionID = %d AND commentID IS NOT NULL',
|
||||
$rev->getID());
|
||||
|
||||
$touches = array();
|
||||
|
||||
foreach ($comments as $comment) {
|
||||
foreach (array_merge($comments, $inlines) as $comment) {
|
||||
if (strlen($comment->getContent())) {
|
||||
// TODO: we should also index inline comments.
|
||||
$doc->addField(
|
||||
PhabricatorSearchField::FIELD_COMMENT,
|
||||
$comment->getContent());
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
phutil_require_module('arcanist', 'differential/constants/revisionstatus');
|
||||
|
||||
phutil_require_module('phabricator', 'applications/differential/storage/comment');
|
||||
phutil_require_module('phabricator', 'applications/differential/storage/inlinecomment');
|
||||
phutil_require_module('phabricator', 'applications/phid/constants');
|
||||
phutil_require_module('phabricator', 'applications/phid/handle/data');
|
||||
|
|
Loading…
Reference in a new issue