Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryURI.php
Show First 20 Lines • Show All 356 Lines • ▼ Show 20 Lines | final class PhabricatorRepositoryURI | ||||
private function getForcedPort() { | private function getForcedPort() { | ||||
$protocol = $this->getBuiltinProtocol(); | $protocol = $this->getBuiltinProtocol(); | ||||
if ($protocol == self::BUILTIN_PROTOCOL_SSH) { | if ($protocol == self::BUILTIN_PROTOCOL_SSH) { | ||||
return PhabricatorEnv::getEnvConfig('diffusion.ssh-port'); | return PhabricatorEnv::getEnvConfig('diffusion.ssh-port'); | ||||
} | } | ||||
// If Phabricator is running on a nonstandard port, use that as the defualt | // If Phabricator is running on a nonstandard port, use that as the default | ||||
// port for URIs with the same protocol. | // port for URIs with the same protocol. | ||||
$is_http = ($protocol == self::BUILTIN_PROTOCOL_HTTP); | $is_http = ($protocol == self::BUILTIN_PROTOCOL_HTTP); | ||||
$is_https = ($protocol == self::BUILTIN_PROTOCOL_HTTPS); | $is_https = ($protocol == self::BUILTIN_PROTOCOL_HTTPS); | ||||
if ($is_http || $is_https) { | if ($is_http || $is_https) { | ||||
$uri = PhabricatorEnv::getURI('/'); | $uri = PhabricatorEnv::getURI('/'); | ||||
$uri = new PhutilURI($uri); | $uri = new PhutilURI($uri); | ||||
▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines |