Added stat handlers
authorMarcel Werk <burntime@woltlab.com>
Mon, 19 May 2014 17:02:37 +0000 (19:02 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 19 May 2014 17:02:37 +0000 (19:02 +0200)
files/lib/system/stat/ConversationMessageStatDailyHandler.class.php [new file with mode: 0644]
files/lib/system/stat/ConversationStatDailyHandler.class.php [new file with mode: 0644]
language/de.xml
language/en.xml
objectType.xml

diff --git a/files/lib/system/stat/ConversationMessageStatDailyHandler.class.php b/files/lib/system/stat/ConversationMessageStatDailyHandler.class.php
new file mode 100644 (file)
index 0000000..66dd2db
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+namespace wcf\system\stat;
+
+/**
+ * Stat handler implementation for conversation messages.
+ *
+ * @author     Marcel Werk
+ * @copyright  2001-2014 WoltLab GmbH
+ * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package    com.woltlab.wcf.conversation
+ * @subpackage system.stat
+ * @category   Community Framework
+ */
+class ConversationMessageStatDailyHandler extends AbstractStatDailyHandler {
+       /**
+        * @see \wcf\system\stat\IStatDailyHandler::getData()
+        */
+       public function getData($date) {
+               return array(
+                       'counter' => $this->getCounter($date, 'wcf'.WCF_N.'_conversation_message', 'time'),
+                       'total' => $this->getTotal($date, 'wcf'.WCF_N.'_conversation_message', 'time')
+               );
+       }
+}
diff --git a/files/lib/system/stat/ConversationStatDailyHandler.class.php b/files/lib/system/stat/ConversationStatDailyHandler.class.php
new file mode 100644 (file)
index 0000000..039a8f7
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+namespace wcf\system\stat;
+
+/**
+ * Stat handler implementation for conversations.
+ *
+ * @author     Marcel Werk
+ * @copyright  2001-2014 WoltLab GmbH
+ * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package    com.woltlab.wcf.conversation
+ * @subpackage system.stat
+ * @category   Community Framework
+ */
+class ConversationStatDailyHandler extends AbstractStatDailyHandler {
+       /**
+        * @see \wcf\system\stat\IStatDailyHandler::getData()
+        */
+       public function getData($date) {
+               return array(
+                       'counter' => $this->getCounter($date, 'wcf'.WCF_N.'_conversation', 'time'),
+                       'total' => $this->getTotal($date, 'wcf'.WCF_N.'_conversation', 'time')
+               );
+       }
+}
index bc2023bb96b50117c94a97e179b494fdae17673d..1da5a01ed4c794b697283fcd65e5d3f7d25b9d9f 100644 (file)
                <item name="wcf.acp.rebuildData.com.woltlab.wcf.conversation.message.description"><![CDATA[Aktualisiert den Suchindex für Konversationsnachrichten]]></item>
        </category>
        
+       <category name="wcf.acp.stat">
+               <item name="wcf.acp.stat.com.woltlab.wcf.conversation"><![CDATA[Konversationen]]></item>
+               <item name="wcf.acp.stat.com.woltlab.wcf.conversation.message"><![CDATA[Konversations-Nachrichten]]></item>
+       </category>
+       
        <category name="wcf.clipboard">
                <item name="wcf.clipboard.item.com.woltlab.wcf.conversation.conversation.assignLabel"><![CDATA[Label zuweisen ({#$count})]]></item>
                <item name="wcf.clipboard.item.com.woltlab.wcf.conversation.conversation.close"><![CDATA[Schließen ({#$count})]]></item>
index 197ffeead407ce9a26de684bdf27492ff659a3e3..92e3ae0409a0b60dd14c0d70eb9424483a5aa331 100644 (file)
                <item name="wcf.acp.rebuildData.com.woltlab.wcf.conversation.message.description"><![CDATA[Rebuild search index for conversation messages]]></item>
        </category>
        
+       <category name="wcf.acp.stat">
+               <item name="wcf.acp.stat.com.woltlab.wcf.conversation"><![CDATA[Conversations]]></item>
+               <item name="wcf.acp.stat.com.woltlab.wcf.conversation.message"><![CDATA[Conversation Messages]]></item>
+       </category>
+       
        <category name="wcf.clipboard">
                <item name="wcf.clipboard.item.com.woltlab.wcf.conversation.conversation.assignLabel"><![CDATA[Assign Label ({#$count})]]></item>
                <item name="wcf.clipboard.item.com.woltlab.wcf.conversation.conversation.close"><![CDATA[Close ({#$count})]]></item>
index 210bf293fc80e5c27804e7462e93b041d198caa7..4742dfdbdbdf2f3910c49102648efef44e969945 100644 (file)
                        <options>module_conversation</options>
                </type>
                <!-- /pages -->
+               
+               <!-- stat handlers -->
+               <type>
+                       <name>com.woltlab.wcf.conversation</name>
+                       <definitionname>com.woltlab.wcf.statDailyHandler</definitionname>
+                       <classname><![CDATA[wcf\system\stat\ConversationStatDailyHandler]]></classname>
+               </type>
+               <type>
+                       <name>com.woltlab.wcf.conversation.message</name>
+                       <definitionname>com.woltlab.wcf.statDailyHandler</definitionname>
+                       <classname><![CDATA[wcf\system\stat\ConversationMessageStatDailyHandler]]></classname>
+               </type>
+               <!-- /stat handlers -->
        </import>
 </data>