Overhauled page tracking in sessions / user online locations
authorMarcel Werk <burntime@woltlab.com>
Wed, 25 May 2016 15:40:52 +0000 (17:40 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 25 May 2016 15:40:52 +0000 (17:40 +0200)
files/lib/form/ConversationAddForm.class.php
files/lib/form/ConversationMessageAddForm.class.php
files/lib/form/ConversationMessageEditForm.class.php
files/lib/page/ConversationListPage.class.php
files/lib/page/ConversationPage.class.php
files/lib/system/page/handler/TConversationOnlineLocationPageHandler.class.php

index 7a5e40caccaf091fde4db80740be3599f9775ce3..48bf944e94f2b8d8c771049403a0b7275b989d54 100644 (file)
@@ -25,11 +25,6 @@ use wcf\util\StringUtil;
  * @category   Community Framework
  */
 class ConversationAddForm extends MessageForm {
-       /**
-        * @inheritDoc
-        */
-       public $enableTracking = true;
-       
        /**
         * @inheritDoc
         */
index db270c70b1d534e606b94c38d77e618f225613c1..b6d85c5a9cd3e9366ddb82f97cbc23739b5a450c 100644 (file)
@@ -24,11 +24,6 @@ use wcf\util\HeaderUtil;
  * @category   Community Framework
  */
 class ConversationMessageAddForm extends MessageForm {
-       /**
-        * @inheritDoc
-        */
-       public $enableTracking = true;
-       
        /**
         * @inheritDoc
         */
@@ -208,18 +203,4 @@ class ConversationMessageAddForm extends MessageForm {
                        'attachmentList' => $this->messageList->getAttachmentList()
                ]);
        }
-       
-       /**
-        * @inheritDoc
-        */
-       public function getObjectType() {
-               return 'com.woltlab.wcf.conversation';
-       }
-       
-       /**
-        * @inheritDoc
-        */
-       public function getObjectID() {
-               return $this->conversationID;
-       }
 }
index 3d19cfd132ab984e474b62926ff29e411835e1da..3e364feef7903d8d0349cc8668274bf6b68f99a6 100644 (file)
@@ -241,18 +241,4 @@ class ConversationMessageEditForm extends ConversationAddForm {
                        'attachmentList' => $this->messageList->getAttachmentList()
                ]);
        }
-       
-       /**
-        * @inheritDoc
-        */
-       public function getObjectType() {
-               return 'com.woltlab.wcf.conversation';
-       }
-       
-       /**
-        * @inheritDoc
-        */
-       public function getObjectID() {
-               return $this->conversationID;
-       }
 }
index 8802dd55cf6d1b6642127df26600e3ccbbcb78c5..b1f97fff25598306d859d9a2a4d5fd33c4888444 100644 (file)
@@ -22,11 +22,6 @@ use wcf\util\ArrayUtil;
  * @property   UserConversationList    $objectList
  */
 class ConversationListPage extends SortablePage {
-       /**
-        * @inheritDoc
-        */
-       public $enableTracking = true;
-       
        /**
         * @inheritDoc
         */
index c4599e0691af959bd748939dc4cf0b2b7a7c6d82..4e88732997b85739975df06765da3758922c674c 100644 (file)
@@ -34,11 +34,6 @@ use wcf\util\StringUtil;
  * @property   ViewableConversationMessageList         $objectList
  */
 class ConversationPage extends MultipleLinkPage {
-       /**
-        * @inheritDoc
-        */
-       public $enableTracking = true;
-       
        /**
         * @inheritDoc
         */
@@ -324,18 +319,4 @@ class ConversationPage extends MultipleLinkPage {
                        $this->goToLastPost();
                }
        }
-       
-       /**
-        * @inheritDoc
-        */
-       public function getObjectType() {
-               return 'com.woltlab.wcf.conversation';
-       }
-       
-       /**
-        * @inheritDoc
-        */
-       public function getObjectID() {
-               return $this->conversationID;
-       }
 }
index a4149c7839824e6bb94817f8f9830fea1a360315..9b93a15ee60f5bbf0fdd0ab3ed696fa0ff0105f3 100644 (file)
@@ -29,11 +29,11 @@ trait TConversationOnlineLocationPageHandler {
         * @return      string
         */
        public function getOnlineLocation(Page $page, UserOnline $user) {
-               if ($user->objectID === null) {
+               if ($user->pageObjectID === null) {
                        return '';
                }
                
-               $conversation = UserConversationRuntimeCache::getInstance()->getObject($user->objectID);
+               $conversation = UserConversationRuntimeCache::getInstance()->getObject($user->pageObjectID);
                if ($conversation === null || !$conversation->canRead()) {
                        return '';
                }
@@ -51,8 +51,8 @@ trait TConversationOnlineLocationPageHandler {
         * @param       UserOnline      $user           user online object with request data
         */
        public function prepareOnlineLocation(Page $page, UserOnline $user) {
-               if ($user->objectID !== null) {
-                       UserConversationRuntimeCache::getInstance()->cacheObjectID($user->objectID);
+               if ($user->pageObjectID !== null) {
+                       UserConversationRuntimeCache::getInstance()->cacheObjectID($user->pageObjectID);
                }
        }
 }