fixed [ 1298851 ] forum subscribers still get notif. after subscr. expired
This commit is contained in:
parent
872fd3c628
commit
e4c2bc9969
3 changed files with 19 additions and 6 deletions
|
|
@ -6,6 +6,7 @@
|
|||
- fix [ 1307043 ] Can't Adjust Order of Nav Menu
|
||||
- fix [ 1298896 ] 6.7.4 - reordering stops working after moving assets
|
||||
- fix [ 1324170 ] assetId has no hoverhelp.
|
||||
- fix [ 1298851 ] forum subscribers still get notif. after subscr. expired
|
||||
|
||||
|
||||
6.7.6
|
||||
|
|
|
|||
|
|
@ -585,10 +585,10 @@ Send notifications to the thread and forum subscribers that a new post has been
|
|||
sub notifySubscribers {
|
||||
my $self = shift;
|
||||
my %subscribers;
|
||||
foreach my $userId (@{WebGUI::Grouping::getUsersInGroup($self->getThread->get("subscriptionGroupId"))}) {
|
||||
foreach my $userId (@{WebGUI::Grouping::getUsersInGroup($self->getThread->get("subscriptionGroupId"),undef,1)}) {
|
||||
$subscribers{$userId} = $userId unless ($userId eq $self->get("ownerUserId"));
|
||||
}
|
||||
foreach my $userId (@{WebGUI::Grouping::getUsersInGroup($self->getThread->getParent->get("subscriptionGroupId"))}) {
|
||||
foreach my $userId (@{WebGUI::Grouping::getUsersInGroup($self->getThread->getParent->get("subscriptionGroupId"),undef,1)}) {
|
||||
$subscribers{$userId} = $userId unless ($userId eq $self->get("ownerUserId"));
|
||||
}
|
||||
my %lang;
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ sub getGroupsInGroup {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getUsersInGroup ( groupId [, recursive ] )
|
||||
=head2 getUsersInGroup ( groupId [, recursive, withoutExpired ] )
|
||||
|
||||
Returns an array reference containing a list of users that belong to the specified group.
|
||||
|
||||
|
|
@ -300,16 +300,28 @@ A unique identifier for the group.
|
|||
|
||||
A boolean value to determine whether the method should return the users directly in the group or to follow the entire groups of groups hierarchy. Defaults to "0".
|
||||
|
||||
=head3 withoutExpired
|
||||
|
||||
A boolean that if set true will return the users list minus the expired groupings.
|
||||
|
||||
=cut
|
||||
|
||||
sub getUsersInGroup {
|
||||
my $clause = "groupId=".quote($_[0]);
|
||||
if ($_[1]) {
|
||||
my $groups = getGroupsInGroup($_[0],1);
|
||||
my $groupId = shift;
|
||||
my $recursive = shift;
|
||||
my $withoutExpired = shift;
|
||||
my $clause;
|
||||
if ($withoutExpired) {
|
||||
$clause = "expireDate > ".time()." and ";
|
||||
}
|
||||
$clause .= "(groupId=".quote($groupId);
|
||||
if ($recursive) {
|
||||
my $groups = getGroupsInGroup($groupId,1);
|
||||
if ($#$groups >= 0) {
|
||||
$clause .= " or groupId in (".quoteAndJoin($groups).")";
|
||||
}
|
||||
}
|
||||
$clause .= ")";
|
||||
return WebGUI::SQL->buildArrayRef("select userId from groupings where $clause");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue