Differential D25104 Diff 439 src/applications/notification/client/PhabricatorNotificationServerRef.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/notification/client/PhabricatorNotificationServerRef.php
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | public function getURI($to_path = null) { | ||||
$full_path = rtrim($this->getPath(), '/').'/'.ltrim($to_path, '/'); | $full_path = rtrim($this->getPath(), '/').'/'.ltrim($to_path, '/'); | ||||
$uri = id(new PhutilURI('http://'.$this->getHost())) | $uri = id(new PhutilURI('http://'.$this->getHost())) | ||||
->setProtocol($this->getProtocol()) | ->setProtocol($this->getProtocol()) | ||||
->setPort($this->getPort()) | ->setPort($this->getPort()) | ||||
->setPath($full_path); | ->setPath($full_path); | ||||
$instance = PhabricatorEnv::getEnvConfig('cluster.instance'); | $instance = PhabricatorEnv::getEnvConfig('cluster.instance'); | ||||
if (strlen($instance)) { | if (phutil_nonempty_string($instance)) { | ||||
$uri->replaceQueryParam('instance', $instance); | $uri->replaceQueryParam('instance', $instance); | ||||
} | } | ||||
return $uri; | return $uri; | ||||
} | } | ||||
public function getWebsocketURI($to_path = null) { | public function getWebsocketURI($to_path = null) { | ||||
$instance = PhabricatorEnv::getEnvConfig('cluster.instance'); | $instance = PhabricatorEnv::getEnvConfig('cluster.instance'); | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0