mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
Don't run "aphlict-listen" behavior if real-time notifications are disabled
Summary: Fixes T5277. We incorrectly ran this unconditionally. Test Plan: Toggled setting on/off, verified behavior ran or did not run. Reviewers: joshuaspence Reviewed By: joshuaspence Subscribers: epriestley Maniphest Tasks: T5277 Differential Revision: https://secure.phabricator.com/D9418
This commit is contained in:
parent
61af2e313b
commit
96d5a9b4c2
1 changed files with 38 additions and 37 deletions
|
@ -352,7 +352,11 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
|
|||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
||||
$container = null;
|
||||
$tail = array(
|
||||
parent::getTail(),
|
||||
);
|
||||
|
||||
if (PhabricatorEnv::getEnvConfig('notification.enabled')) {
|
||||
if ($user && $user->isLoggedIn()) {
|
||||
|
||||
$aphlict_object_id = celerity_generate_unique_node_id();
|
||||
|
@ -377,7 +381,8 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
|
|||
'debug' => $enable_debug,
|
||||
'pageObjects' => array_fill_keys($this->pageObjects, true),
|
||||
));
|
||||
$container = phutil_tag(
|
||||
|
||||
$tail[] = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'id' => $aphlict_container_id,
|
||||
|
@ -386,16 +391,12 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
|
|||
),
|
||||
'');
|
||||
}
|
||||
}
|
||||
|
||||
$response = CelerityAPI::getStaticResourceResponse();
|
||||
$tail[] = $response->renderHTMLFooter();
|
||||
|
||||
$tail = array(
|
||||
parent::getTail(),
|
||||
$container,
|
||||
$response->renderHTMLFooter(),
|
||||
);
|
||||
|
||||
return phutil_implode_html("\n", $tail);
|
||||
return $tail;
|
||||
}
|
||||
|
||||
protected function getBodyClasses() {
|
||||
|
|
Loading…
Reference in a new issue