1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

Fix watchers to actually work properly

This commit is contained in:
epriestley 2014-05-20 08:19:44 -07:00
parent 6e9753c66c
commit 481a295454

View file

@ -1931,15 +1931,17 @@ abstract class PhabricatorApplicationTransactionEditor
->withPHIDs($watcher_phids) ->withPHIDs($watcher_phids)
->execute(); ->execute();
$watchers = array();
foreach ($users as $user) { foreach ($users as $user) {
$can_see = PhabricatorPolicyFilter::hasCapability( $can_see = PhabricatorPolicyFilter::hasCapability(
$user, $user,
$object, $object,
PhabricatorPolicyCapability::CAN_VIEW); PhabricatorPolicyCapability::CAN_VIEW);
if ($can_see) { if ($can_see) {
$phids[] = $user->getPHID(); $watchers[] = $user->getPHID();
} }
} }
$phids[] = $watchers;
} }
} }