[buddypress-trac] [BuddyPress Trac] #8426: Update queries when new message notifications mark as read

buddypress-trac noreply at wordpress.org
Mon Sep 13 05:42:47 UTC 2021


#8426: Update queries when new message notifications mark as read
--------------------------+---------------------
 Reporter:  oztaser       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  10.0.0
Component:  Messages      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+---------------------

Comment (by oztaser):

 I've updated the patch based on your comment but It isn't finished yet, I
 need your opinion about updating `get_query_clauses` function.  Is it ok
 to edit that function as I've done? Or should we prepare query clauses on
 our new function `update_many`.

 Right now it supports array of `ids` and `item_ids` on where clause.

 {{{#!php
 <?php
 BP_Notifications_Notification::update_many(
     array(
         'is_new' => 0
     ),
     array(
         'id' => array( 1, 2, 3 )
     ),
 );
 }}}


 {{{#!php
 <?php
 BP_Notifications_Notification::update_many(
     array(
         'is_new' => 0
     ),
     array(
         'item_ids' => array( 1, 2, 3 )
     ),
 );
 }}}

 I am open any other suggestions about the patch.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8426#comment:14>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list