Changeset View
Changeset View
Standalone View
Standalone View
src/browse/workflow/ArcanistBrowseWorkflow.php
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Lines | foreach ($open_uris as $ref) { | ||||
if ($pick_map[$pick_selection] !== $uri) { | if ($pick_map[$pick_selection] !== $uri) { | ||||
unset($ref_uris[$uri_key]); | unset($ref_uris[$uri_key]); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
$ref_uri = head($ref_uris); | $ref_uri = head($ref_uris); | ||||
// TODO: "ArcanistRevisionRef", at least, may return a relative URI. | |||||
// If we get a relative URI, guess the correct absolute URI based on | |||||
// the Conduit URI. This might not be correct for Conduit over SSH. | |||||
$raw_uri = $ref_uri->getURI(); | $raw_uri = $ref_uri->getURI(); | ||||
$raw_uri = $this->getAbsoluteURI($raw_uri); | |||||
$raw_uri = new PhutilURI($raw_uri); | |||||
if (!strlen($raw_uri->getDomain())) { | |||||
$base_uri = $this->getConduitEngine() | |||||
->getConduitURI(); | |||||
$raw_uri = id(new PhutilURI($base_uri)) | |||||
->setPath($raw_uri->getPath()); | |||||
} | |||||
$raw_uri = phutil_string_cast($raw_uri); | |||||
$uris[] = $raw_uri; | $uris[] = $raw_uri; | ||||
} | } | ||||
$this->openURIsInBrowser($uris); | $this->openURIsInBrowser($uris); | ||||
return 0; | return 0; | ||||
} | } | ||||
} | } |