1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Fix an issue with Diffusion where paging by commit date would fail

Summary: When loading the cursor repository, we need to load the most recent
commit too if we're paging by commit date. This fixes a fatal for installs
with more than 100 repositories.

Auditors: btrahan
This commit is contained in:
epriestley 2013-09-23 18:23:55 -07:00
parent 806ba1e7a1
commit b928e7f8f5

View file

@ -163,10 +163,15 @@ final class PhabricatorRepositoryQuery
}
private function loadCursorObject($id) {
$results = id(new PhabricatorRepositoryQuery())
$query = id(new PhabricatorRepositoryQuery())
->setViewer($this->getPagingViewer())
->withIDs(array((int)$id))
->execute();
->withIDs(array((int)$id));
if ($this->order == self::ORDER_COMMITTED) {
$query->needMostRecentCommits(true);
}
$results = $query->execute();
return head($results);
}