* Ported the PHP-BBCode parser, massively improves accuracy and ensures validity
* Show error message if poll options are given but not question instead of discarding poll options.
* `parentObjectID` column added to `modification_log` and `wcf\system\log\modification\AbstractModificationLogHandler` introduced as a replacement for `wcf\system\log\modification\ModificationLogHandler`.
+* `wcf\data\TUserContent` added.
--- /dev/null
+<?php
+namespace wcf\data;
+
+/**
+ * Default implementation of the (non-inherited) methods of the IUserContent interface.
+ *
+ * @author Matthias Schmidt
+ * @copyright 2001-2015 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data
+ * @category Community Framework
+ */
+trait TUserContent {
+ /**
+ * @see IUserContent::getTime()
+ */
+ public function getTime() {
+ return $this->time;
+ }
+
+ /**
+ * @see IUserContent::getUserID()
+ */
+ public function getUserID() {
+ return $this->userID;
+ }
+
+ /**
+ * @see IUserContent::getUsername()
+ */
+ public function getUsername() {
+ return $this->username;
+ }
+}
namespace wcf\data\comment;
use wcf\data\DatabaseObject;
use wcf\data\IMessage;
+use wcf\data\TUserContent;
use wcf\system\bbcode\SimpleMessageParser;
use wcf\system\comment\CommentHandler;
use wcf\util\StringUtil;
* @category Community Framework
*/
class Comment extends DatabaseObject implements IMessage {
+ use TUserContent;
+
/**
* @see \wcf\data\DatabaseObject::$databaseTableName
*/
return $this->message;
}
- /**
- * @see \wcf\data\IUserContent::getTime()
- */
- public function getTime() {
- return $this->time;
- }
-
- /**
- * @see \wcf\data\IUserContent::getUserID()
- */
- public function getUserID() {
- return $this->userID;
- }
-
- /**
- * @see \wcf\data\IUserContent::getUsername()
- */
- public function getUsername() {
- return $this->username;
- }
-
/**
* @see \wcf\data\ILinkableObject::getLink()
*/
use wcf\data\comment\Comment;
use wcf\data\DatabaseObject;
use wcf\data\IMessage;
+use wcf\data\TUserContent;
use wcf\system\bbcode\SimpleMessageParser;
use wcf\system\comment\CommentHandler;
use wcf\util\StringUtil;
* @category Community Framework
*/
class CommentResponse extends DatabaseObject implements IMessage {
+ use TUserContent;
+
/**
* @see \wcf\data\DatabaseObject::$databaseTableName
*/
return $this->message;
}
- /**
- * @see \wcf\data\IUserContent::getTime()
- */
- public function getTime() {
- return $this->time;
- }
-
- /**
- * @see \wcf\data\IUserContent::getUserID()
- */
- public function getUserID() {
- return $this->userID;
- }
-
- /**
- * @see \wcf\data\IUserContent::getUsername()
- */
- public function getUsername() {
- return $this->username;
- }
-
/**
* @see \wcf\data\ILinkableObject::getLink()
*/