Log in

View Full Version : Problem with PM not decreading new pms


intrigue
03-01-2005, 12:12 PM
Basically the user gets a pm and it says 1 new pm
then they go read the pm and it should say no new pms
but it doesnt it remains as 1 new pm
anyone know where the function is that decrements the new pm count when the user reads it. I have a feeling one of the hacks i have installed causes this problem!
Thanks
.matt

Marco van Herwaarden
03-01-2005, 12:25 PM
private.php

intrigue
03-01-2005, 01:07 PM
i realise thats the file that private messages are sent from but does that decrement the count within that file if so a example of where i can find this code would be better then a filename im guessing
thanks all the same
.matt

Marco van Herwaarden
03-01-2005, 01:45 PM
// update message to show read
if ($pm['messageread'] == 0)
{
$DB_site->shutdown_query("UPDATE " . TABLE_PREFIX . "pm SET messageread=1 WHERE userid=$bbuserinfo[userid] AND pmid=$pmid");
$DB_site->shutdown_query("UPDATE " . TABLE_PREFIX . "user SET pmunread=pmunread-1 WHERE userid=$bbuserinfo[userid]");
}