mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/11103] Make sure post/topic approved notifications are always unread
PHPBB3-11103
This commit is contained in:
parent
ead1d92b22
commit
6c213bd5fa
2 changed files with 40 additions and 0 deletions
|
@ -78,6 +78,26 @@ class phpbb_notification_type_approve_post extends phpbb_notification_type_post
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pre create insert array function
|
||||||
|
* This allows you to perform certain actions, like run a query
|
||||||
|
* and load data, before create_insert_array() is run. The data
|
||||||
|
* returned from this function will be sent to create_insert_array().
|
||||||
|
*
|
||||||
|
* @param array $post Post data from submit_post
|
||||||
|
* @param array $notify_users Notify users list
|
||||||
|
* Formated from find_users_for_notification()
|
||||||
|
* @return array Whatever you want to send to create_insert_array().
|
||||||
|
*/
|
||||||
|
public function pre_create_insert_array($post, $notify_users)
|
||||||
|
{
|
||||||
|
// In the parent class, this is used to check if the post is already
|
||||||
|
// read by a user and marks the notification read if it was marked read.
|
||||||
|
// Returning an empty array in effect, forces it to be marked as unread
|
||||||
|
// (and also saves a query)
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function for preparing the data for insertion in an SQL query
|
* Function for preparing the data for insertion in an SQL query
|
||||||
* (The service handles insertion)
|
* (The service handles insertion)
|
||||||
|
|
|
@ -78,6 +78,26 @@ class phpbb_notification_type_approve_topic extends phpbb_notification_type_topi
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pre create insert array function
|
||||||
|
* This allows you to perform certain actions, like run a query
|
||||||
|
* and load data, before create_insert_array() is run. The data
|
||||||
|
* returned from this function will be sent to create_insert_array().
|
||||||
|
*
|
||||||
|
* @param array $post Post data from submit_post
|
||||||
|
* @param array $notify_users Notify users list
|
||||||
|
* Formated from find_users_for_notification()
|
||||||
|
* @return array Whatever you want to send to create_insert_array().
|
||||||
|
*/
|
||||||
|
public function pre_create_insert_array($post, $notify_users)
|
||||||
|
{
|
||||||
|
// In the parent class, this is used to check if the post is already
|
||||||
|
// read by a user and marks the notification read if it was marked read.
|
||||||
|
// Returning an empty array in effect, forces it to be marked as unread
|
||||||
|
// (and also saves a query)
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function for preparing the data for insertion in an SQL query
|
* Function for preparing the data for insertion in an SQL query
|
||||||
* (The service handles insertion)
|
* (The service handles insertion)
|
||||||
|
|
Loading…
Add table
Reference in a new issue