Version 2.1.3

This commit is contained in:
dmzx
2019-08-29 08:41:42 +02:00
parent 940161da23
commit 4d7253f0f0
11 changed files with 149 additions and 69 deletions

View File

@@ -208,6 +208,7 @@ class notifications
return $post_subjects + $missing_post_subjects;
}
/**
* Converts the message field of the post row so that it can be passed to generate_text_for_display()
*
@@ -374,12 +375,14 @@ class notifications
* Generates an SQL WHERE condition to include or exlude notifacation
* messages based on the current user's settings and permissions
*
* @param string $mode One of user|exclude. user mode uses the current user's settings to decide which notifications
* to exclude. exclude mode always excludes all notifications.
* @return string
*/
public function get_sql_where()
public function get_sql_where($mode = 'user')
{
// Exclude all post notifications
if (!$this->mchat_settings->cfg('mchat_posts'))
if ($mode == 'exclude' || !$this->mchat_settings->cfg('mchat_posts'))
{
return 'm.post_id = 0';
}