Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15341227
D9418.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D9418.diff
View Options
diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php
--- a/src/view/page/PhabricatorStandardPageView.php
+++ b/src/view/page/PhabricatorStandardPageView.php
@@ -352,50 +352,51 @@
$request = $this->getRequest();
$user = $request->getUser();
- $container = null;
- if ($user && $user->isLoggedIn()) {
-
- $aphlict_object_id = celerity_generate_unique_node_id();
- $aphlict_container_id = celerity_generate_unique_node_id();
-
- $client_uri = PhabricatorEnv::getEnvConfig('notification.client-uri');
- $client_uri = new PhutilURI($client_uri);
- if ($client_uri->getDomain() == 'localhost') {
- $this_host = $this->getRequest()->getHost();
- $this_host = new PhutilURI('http://'.$this_host.'/');
- $client_uri->setDomain($this_host->getDomain());
- }
+ $tail = array(
+ parent::getTail(),
+ );
- $enable_debug = PhabricatorEnv::getEnvConfig('notification.debug');
- Javelin::initBehavior(
- 'aphlict-listen',
- array(
- 'id' => $aphlict_object_id,
- 'containerID' => $aphlict_container_id,
- 'server' => $client_uri->getDomain(),
- 'port' => $client_uri->getPort(),
- 'debug' => $enable_debug,
- 'pageObjects' => array_fill_keys($this->pageObjects, true),
- ));
- $container = phutil_tag(
- 'div',
- array(
- 'id' => $aphlict_container_id,
- 'style' =>
- 'position: absolute; width: 0; height: 0; overflow: hidden;',
- ),
- '');
+ if (PhabricatorEnv::getEnvConfig('notification.enabled')) {
+ if ($user && $user->isLoggedIn()) {
+
+ $aphlict_object_id = celerity_generate_unique_node_id();
+ $aphlict_container_id = celerity_generate_unique_node_id();
+
+ $client_uri = PhabricatorEnv::getEnvConfig('notification.client-uri');
+ $client_uri = new PhutilURI($client_uri);
+ if ($client_uri->getDomain() == 'localhost') {
+ $this_host = $this->getRequest()->getHost();
+ $this_host = new PhutilURI('http://'.$this_host.'/');
+ $client_uri->setDomain($this_host->getDomain());
+ }
+
+ $enable_debug = PhabricatorEnv::getEnvConfig('notification.debug');
+ Javelin::initBehavior(
+ 'aphlict-listen',
+ array(
+ 'id' => $aphlict_object_id,
+ 'containerID' => $aphlict_container_id,
+ 'server' => $client_uri->getDomain(),
+ 'port' => $client_uri->getPort(),
+ 'debug' => $enable_debug,
+ 'pageObjects' => array_fill_keys($this->pageObjects, true),
+ ));
+
+ $tail[] = phutil_tag(
+ 'div',
+ array(
+ 'id' => $aphlict_container_id,
+ 'style' =>
+ 'position: absolute; width: 0; height: 0; overflow: hidden;',
+ ),
+ '');
+ }
}
$response = CelerityAPI::getStaticResourceResponse();
+ $tail[] = $response->renderHTMLFooter();
- $tail = array(
- parent::getTail(),
- $container,
- $response->renderHTMLFooter(),
- );
-
- return phutil_implode_html("\n", $tail);
+ return $tail;
}
protected function getBodyClasses() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 10, 7:08 PM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7466075
Default Alt Text
D9418.diff (3 KB)
Attached To
Mode
D9418: Don't run "aphlict-listen" behavior if real-time notifications are disabled
Attached
Detach File
Event Timeline
Log In to Comment