Resets conversation count if user leaves conversation
authorMatthias Schmidt <gravatronics@live.com>
Wed, 9 Jan 2013 14:21:23 +0000 (15:21 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 9 Jan 2013 14:21:23 +0000 (15:21 +0100)
Fixes #47

files/lib/data/conversation/ConversationAction.class.php

index d682cb59642bbdd349b884da4e68103e4717ec52..e6b90d78e700b186faea8202c21ad6c94b037916 100644 (file)
@@ -434,6 +434,11 @@ class ConversationAction extends AbstractDatabaseObjectAction implements IClipbo
                }
                WCF::getDB()->commitTransaction();
                
+               // reset user's conversationCount if user leaves conversation permanently
+               if ($this->parameters['hideConversation'] == 2) {
+                       UserStorageHandler::getInstance()->reset(array(WCF::getUser()->userID), 'conversationCount');
+               }
+               
                // unmark items
                $this->unmarkItems();