Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionExternalController.php
Show All 27 Lines | if ($uri) { | ||||
// comparing repository metadata. We look for an exact match, but accept | // comparing repository metadata. We look for an exact match, but accept | ||||
// a partial match. | // a partial match. | ||||
foreach ($repositories as $key => $repository) { | foreach ($repositories as $key => $repository) { | ||||
$remote_uri = new PhutilURI($repository->getRemoteURI()); | $remote_uri = new PhutilURI($repository->getRemoteURI()); | ||||
if ($remote_uri->getPath() == $uri_path) { | if ($remote_uri->getPath() == $uri_path) { | ||||
$matches[$key] = 1; | $matches[$key] = 1; | ||||
} | } | ||||
if ($repository->getPublicRemoteURI() == $uri) { | if ($repository->getPublicCloneURI() == $uri) { | ||||
$matches[$key] = 2; | $matches[$key] = 2; | ||||
} | } | ||||
if ($repository->getRemoteURI() == $uri) { | if ($repository->getRemoteURI() == $uri) { | ||||
$matches[$key] = 3; | $matches[$key] = 3; | ||||
} | } | ||||
} | } | ||||
arsort($matches); | arsort($matches); | ||||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |