Merge request #10 by aroque but in a slightly different version
This commit is contained in:
parent
31c8416a8f
commit
1946197a1c
@ -1721,9 +1721,9 @@ class Notice extends Managed_DataObject
|
||||
*
|
||||
* @return array of Profiles
|
||||
*/
|
||||
function getReplyProfiles()
|
||||
function getAttentionProfiles()
|
||||
{
|
||||
$ids = $this->getReplies();
|
||||
$ids = array_unique(array_merge($this->getReplies(), $this->getGroupProfileIDs()));
|
||||
|
||||
$profiles = Profile::multiGet('id', $ids);
|
||||
|
||||
@ -1759,6 +1759,23 @@ class Notice extends Managed_DataObject
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Pull list of Profile IDs of groups this notice addresses.
|
||||
*
|
||||
* @return array of Group _profile_ IDs
|
||||
*/
|
||||
|
||||
function getGroupProfileIDs()
|
||||
{
|
||||
$ids = array();
|
||||
|
||||
foreach ($this->getGroups() as $group) {
|
||||
$ids[] = $group->profile_id;
|
||||
}
|
||||
|
||||
return $ids;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pull list of groups this notice needs to be delivered to,
|
||||
* as previously recorded by saveKnownGroups().
|
||||
|
@ -297,7 +297,7 @@ class NoticeListItem extends Widget
|
||||
if($this->pa) { return $this->pa; }
|
||||
$this->pa = array();
|
||||
|
||||
$attentions = $this->getReplyProfiles();
|
||||
$attentions = $this->getAttentionProfiles();
|
||||
|
||||
foreach ($attentions as $attn) {
|
||||
$class = $attn->isGroup() ? 'group' : 'account';
|
||||
@ -310,9 +310,9 @@ class NoticeListItem extends Widget
|
||||
return $this->pa;
|
||||
}
|
||||
|
||||
function getReplyProfiles()
|
||||
function getAttentionProfiles()
|
||||
{
|
||||
return $this->notice->getReplyProfiles();
|
||||
return $this->notice->getAttentionProfiles();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -282,9 +282,9 @@ class ThreadedNoticeListSubItem extends NoticeListItem
|
||||
//
|
||||
}
|
||||
|
||||
function getReplyProfiles()
|
||||
function getAttentionProfiles()
|
||||
{
|
||||
$all = parent::getReplyProfiles();
|
||||
$all = parent::getAttentionProfiles();
|
||||
|
||||
$profiles = array();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user