Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -191,16 +191,16 @@ trait Reactable
|
||||
/* Remove Notifications */
|
||||
$memberIds = array();
|
||||
|
||||
foreach( \IPS\Db::i()->select( 'member', 'core_notifications', array( 'notification_key=? AND item_class=? AND item_id=?', 'new_likes', (string) get_class( $this ), (int) $this->$idColumn ) ) as $member )
|
||||
foreach( \IPS\Db::i()->select( 'member', 'core_notifications', array( 'notification_key=? AND item_class=? AND item_id=?', 'new_likes', (string) get_class( $this ), (int) $this->$idColumn ) ) as $memberToRecount )
|
||||
{
|
||||
$memberIds[ $member ] = $member;
|
||||
$memberIds[ $memberToRecount ] = $memberToRecount;
|
||||
}
|
||||
|
||||
\IPS\Db::i()->delete( 'core_notifications', array( 'notification_key=? AND item_class=? AND item_id=?', 'new_likes', (string) get_class( $this ), (int) $this->$idColumn ) );
|
||||
|
||||
foreach( $memberIds as $member )
|
||||
foreach( $memberIds as $memberToRecount )
|
||||
{
|
||||
\IPS\Member::load( $member )->recountNotifications();
|
||||
\IPS\Member::load( $memberToRecount )->recountNotifications();
|
||||
}
|
||||
|
||||
/* Reset some cached values */
|
||||
|
||||
Reference in new issue
Block a user