Changeset View
Changeset View
Standalone View
Standalone View
src/view/page/PhabricatorStandardPageView.php
| Show First 20 Lines • Show All 370 Lines • ▼ Show 20 Lines | if (PhabricatorEnv::getEnvConfig('notification.enabled')) { | ||||
| $this_host = new PhutilURI('http://'.$this_host.'/'); | $this_host = new PhutilURI('http://'.$this_host.'/'); | ||||
| $client_uri->setDomain($this_host->getDomain()); | $client_uri->setDomain($this_host->getDomain()); | ||||
| } | } | ||||
| $map = CelerityResourceMap::getNamedInstance('phabricator'); | $map = CelerityResourceMap::getNamedInstance('phabricator'); | ||||
| $swf_uri = $response->getURI($map, 'rsrc/swf/aphlict.swf'); | $swf_uri = $response->getURI($map, 'rsrc/swf/aphlict.swf'); | ||||
| $enable_debug = PhabricatorEnv::getEnvConfig('notification.debug'); | $enable_debug = PhabricatorEnv::getEnvConfig('notification.debug'); | ||||
| $subscriptions = $this->pageObjects; | |||||
| if ($user) { | |||||
| $subscriptions[] = $user->getPHID(); | |||||
| } | |||||
| Javelin::initBehavior( | Javelin::initBehavior( | ||||
| 'aphlict-listen', | 'aphlict-listen', | ||||
| array( | array( | ||||
| 'id' => $aphlict_object_id, | 'id' => $aphlict_object_id, | ||||
| 'containerID' => $aphlict_container_id, | 'containerID' => $aphlict_container_id, | ||||
| 'server' => $client_uri->getDomain(), | 'server' => $client_uri->getDomain(), | ||||
| 'port' => $client_uri->getPort(), | 'port' => $client_uri->getPort(), | ||||
| 'debug' => $enable_debug, | 'debug' => $enable_debug, | ||||
| 'swfURI' => $swf_uri, | 'swfURI' => $swf_uri, | ||||
| 'pageObjects' => array_fill_keys($this->pageObjects, true), | 'pageObjects' => array_fill_keys($this->pageObjects, true), | ||||
| 'subscriptions' => $subscriptions, | |||||
| )); | )); | ||||
epriestley: For logged-out users, this will add a `null` to the end of the list. | |||||
| $tail[] = phutil_tag( | $tail[] = phutil_tag( | ||||
| 'div', | 'div', | ||||
| array( | array( | ||||
| 'id' => $aphlict_container_id, | 'id' => $aphlict_container_id, | ||||
| 'style' => | 'style' => | ||||
| 'position: absolute; width: 0; height: 0; overflow: hidden;', | 'position: absolute; width: 0; height: 0; overflow: hidden;', | ||||
| ), | ), | ||||
| ''); | ''); | ||||
| ▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines | |||||
For logged-out users, this will add a null to the end of the list.