1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00

Check for calendar before settings status

Summary:
We should not show the status line in the people hover card
if the calendar app has been uninstalled or is not available for the
current user.

Test Plan:
View hover card with calendar installed and uninstalled.
Make sure I see the status at the correct time.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, chad, Korvin

Maniphest Tasks: T5370

Differential Revision: https://secure.phabricator.com/D9577
This commit is contained in:
Gareth Evans 2014-06-16 12:18:24 -07:00 committed by epriestley
parent 657d061a78
commit 824b8108da

View file

@ -37,7 +37,9 @@ final class PhabricatorPeopleHovercardEventListener
$hovercard->addField(pht('Account'), pht('Disabled')); $hovercard->addField(pht('Account'), pht('Disabled'));
} else if (!$user->isUserActivated()) { } else if (!$user->isUserActivated()) {
$hovercard->addField(pht('Account'), pht('Not Activated')); $hovercard->addField(pht('Account'), pht('Not Activated'));
} else { } else if (PhabricatorApplication::isClassInstalledForViewer(
'PhabricatorApplicationCalendar',
$viewer)) {
$statuses = id(new PhabricatorCalendarEvent())->loadCurrentStatuses( $statuses = id(new PhabricatorCalendarEvent())->loadCurrentStatuses(
array($user->getPHID())); array($user->getPHID()));
if ($statuses) { if ($statuses) {