1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01: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);
}