From: Marcel Werk Date: Sat, 22 Feb 2014 21:29:12 +0000 (+0100) Subject: Added viewable comment list X-Git-Tag: 2.0.3~23 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=132f6a116e82e1d7b65c4436cfc4f560eb74d062;p=GitHub%2FWoltLab%2FWCF.git Added viewable comment list --- diff --git a/wcfsetup/install/files/lib/data/comment/ViewableCommentList.class.php b/wcfsetup/install/files/lib/data/comment/ViewableCommentList.class.php new file mode 100644 index 0000000000..e725d4246f --- /dev/null +++ b/wcfsetup/install/files/lib/data/comment/ViewableCommentList.class.php @@ -0,0 +1,32 @@ + + * @package com.woltlab.wcf + * @subpackage data.comment + * @category Community Framework + */ +class ViewableCommentList extends CommentList { + /** + * @see \wcf\data\DatabaseObjectList::$decoratorClassName + */ + public $decoratorClassName = 'wcf\data\comment\ViewableComment'; + + /** + * Creates a new ViewableCommentList object. + */ + public function __construct() { + parent::__construct(); + + // get avatars + if (!empty($this->sqlSelects)) $this->sqlSelects .= ','; + $this->sqlSelects .= "user_avatar.*, user_table.*"; + $this->sqlJoins .= " LEFT JOIN wcf".WCF_N."_user user_table ON (user_table.userID = comment.userID)"; + $this->sqlJoins .= " LEFT JOIN wcf".WCF_N."_user_avatar user_avatar ON (user_avatar.avatarID = user_table.avatarID)"; + } +}