From 47d820bbb45d4827a1745d1822ec54f5b0059000 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 27 May 2014 21:14:19 +0200 Subject: [PATCH] Added missing file --- .../LikesUserProfileMenuContent.class.php | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 wcfsetup/install/files/lib/system/menu/user/profile/content/LikesUserProfileMenuContent.class.php diff --git a/wcfsetup/install/files/lib/system/menu/user/profile/content/LikesUserProfileMenuContent.class.php b/wcfsetup/install/files/lib/system/menu/user/profile/content/LikesUserProfileMenuContent.class.php new file mode 100644 index 0000000000..337c7fcd29 --- /dev/null +++ b/wcfsetup/install/files/lib/system/menu/user/profile/content/LikesUserProfileMenuContent.class.php @@ -0,0 +1,43 @@ + + * @package com.woltlab.wcf + * @subpackage system.menu.user.profile.content + * @category Community Framework + */ +class LikesUserProfileMenuContent extends SingletonFactory implements IUserProfileMenuContent { + /** + * @see \wcf\system\menu\user\profile\content\IUserProfileMenuContent::getContent() + */ + public function getContent($userID) { + $likeList = new ViewableLikeList(); + $likeList->getConditionBuilder()->add("like_table.objectUserID = ?", array($userID)); + $likeList->getConditionBuilder()->add("like_table.likeValue = ?", array(Like::LIKE)); + $likeList->readObjects(); + + WCF::getTPL()->assign(array( + 'likeList' => $likeList, + 'userID' => $userID, + 'lastLikeTime' => $likeList->getLastLikeTime(), + )); + + return WCF::getTPL()->fetch('userProfileLikes'); + } + + /** + * @see \wcf\system\menu\user\profile\content\IUserProfileMenuContent::isVisible() + */ + public function isVisible($userID) { + return true; + } +} -- 2.20.1