From 847a639d893cff4ae821615ddb48061cedb64def Mon Sep 17 00:00:00 2001 From: REJack Date: Mon, 30 May 2016 22:59:50 +0200 Subject: [PATCH] - reverted changed `count_unread_pms()` it counts now only not deleted pm's - changed `delete_pm()` if a receiver deletes a pm it updates date_read --- application/libraries/Aauth.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 7528c2c..82b9b8d 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -2053,7 +2053,7 @@ class Aauth { return $this->aauth_db->delete( $this->config_vars['pms'], array('id' => $pm_id)); } - return $this->aauth_db->update( $this->config_vars['pms'], array('pm_deleted_receiver'=>1), array('id' => $pm_id) ); + return $this->aauth_db->update( $this->config_vars['pms'], array('pm_deleted_receiver'=>1, 'date_read'=>date('Y-m-d H:i:s')), array('id' => $pm_id) ); } } @@ -2084,7 +2084,6 @@ class Aauth { } $query = $this->aauth_db->where('receiver_id', $receiver_id); - $query = $this->aauth_db->where('pm_deleted_receiver', 0); $query = $this->aauth_db->where('date_read', NULL); $query = $this->aauth_db->get( $this->config_vars['pms'] );