mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 09:20:58 +01:00
Fix two Pholio subscriptions issues
Summary: - Grouping inline comments made us render `array(null)` for the content of a single comment. Detect that this corresponds to empty text. - Don't try to mention-subscribe automatic subscribers, like the author. Test Plan: Tried to mention-subscribe the author, saw no "x subscribed y" transaction generate. Added a real subscriber, saw no empty content render. Reviewers: chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D5315
This commit is contained in:
parent
590f54a20e
commit
71d0465331
2 changed files with 6 additions and 3 deletions
|
@ -429,9 +429,12 @@ abstract class PhabricatorApplicationTransactionEditor
|
||||||
$phids = array_diff($phids, $this->subscribers);
|
$phids = array_diff($phids, $this->subscribers);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$phids) {
|
foreach ($phids as $key => $phid) {
|
||||||
return null;
|
if ($object->isAutomaticallySubscribed($phid)) {
|
||||||
|
unset($phids[$key]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
$phids = array_values($phids);
|
||||||
|
|
||||||
$xaction = newv(get_class(head($xactions)), array());
|
$xaction = newv(get_class(head($xactions)), array());
|
||||||
$xaction->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS);
|
$xaction->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS);
|
||||||
|
|
|
@ -163,7 +163,7 @@ final class PhabricatorTimelineEventView extends AphrontView {
|
||||||
$classes = array();
|
$classes = array();
|
||||||
$classes[] = 'phabricator-timeline-event-view';
|
$classes[] = 'phabricator-timeline-event-view';
|
||||||
$classes[] = 'phabricator-timeline-border';
|
$classes[] = 'phabricator-timeline-border';
|
||||||
if ($content) {
|
if (!$this->isEmptyContent($content)) {
|
||||||
$classes[] = 'phabricator-timeline-major-event';
|
$classes[] = 'phabricator-timeline-major-event';
|
||||||
$content = phutil_tag(
|
$content = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
|
|
Loading…
Reference in a new issue