1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Remove completely pointless load of every repository when viewing a repository URI

Summary:
See D18176. This query has no effect (other than wasting resources) and the result is unused.

`$repository` already has the URI loaded because we load them unconditionally during request initialization.

Test Plan: Viewed repository URIs.

Subscribers: jmeador

Differential Revision: https://secure.phabricator.com/D19036
This commit is contained in:
epriestley 2018-02-08 12:41:11 -08:00
parent 705ff8d33d
commit d1e273daf6

View file

@ -23,14 +23,10 @@ final class DiffusionRepositoryURIViewController
return new Aphront404Response();
}
// For display, reload the URI by loading it through the repository. This
// For display, access the URI by loading it through the repository. This
// may adjust builtin URIs for repository configuration, so we may end up
// with a different view of builtin URIs than we'd see if we loaded them
// directly from the database. See T12884.
$repository_with_uris = id(new PhabricatorRepositoryQuery())
->setViewer($viewer)
->needURIs(true)
->execute();
$repository_uris = $repository->getURIs();
$repository_uris = mpull($repository_uris, null, 'getID');