Added detailed list of received/given likes in user profiles
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / data / comment / ViewableCommentList.class.php
1 <?php
2 namespace wcf\data\comment;
3
4 /**
5 * Represents a list of decorated comment objects.
6 *
7 * @author Marcel Werk
8 * @copyright 2001-2014 WoltLab GmbH
9 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
10 * @package com.woltlab.wcf
11 * @subpackage data.comment
12 * @category Community Framework
13 */
14 class ViewableCommentList extends CommentList {
15 /**
16 * @see \wcf\data\DatabaseObjectList::$decoratorClassName
17 */
18 public $decoratorClassName = 'wcf\data\comment\ViewableComment';
19
20 /**
21 * Creates a new ViewableCommentList object.
22 */
23 public function __construct() {
24 parent::__construct();
25
26 // get avatars
27 if (!empty($this->sqlSelects)) $this->sqlSelects .= ',';
28 $this->sqlSelects .= "user_avatar.*, user_table.*";
29 $this->sqlJoins .= " LEFT JOIN wcf".WCF_N."_user user_table ON (user_table.userID = comment.userID)";
30 $this->sqlJoins .= " LEFT JOIN wcf".WCF_N."_user_avatar user_avatar ON (user_avatar.avatarID = user_table.avatarID)";
31 }
32 }