<suffix>days</suffix>
</option>
<!-- /user.cleanup -->
- <option name="like_allow_for_own_content">
- <categoryname>message.general.likes</categoryname>
- <optiontype>boolean</optiontype>
- <defaultvalue>0</defaultvalue>
- <options>module_like</options>
- </option>
- <option name="like_enable_dislike">
- <categoryname>message.general.likes</categoryname>
- <optiontype>boolean</optiontype>
- <defaultvalue>0</defaultvalue>
- <options>module_like</options>
- <hidden>1</hidden>
- </option>
<option name="like_show_summary">
<categoryname>message.general.likes</categoryname>
<optiontype>boolean</optiontype>
</import>
<delete>
<option name="attachment_storage" />
+ <option name="like_allow_for_own_content" />
+ <option name="like_enable_dislike" />
<option name="module_attachment"/>
</delete>
</data>
<div class="col-xs-12 col-md-6 col-md{if !(MODULE_LIKE && ARTICLE_ENABLE_LIKE && $__wcf->session->getPermission('user.like.canViewLike'))} col-md-offset-6{/if}">
<ul class="articleLikeButtons buttonGroup">
- {if MODULE_LIKE && ARTICLE_ENABLE_LIKE && $__wcf->session->getPermission('user.like.canLike') && (LIKE_ALLOW_FOR_OWN_CONTENT || $article->userID != $__wcf->user->userID)}
+ {if MODULE_LIKE && ARTICLE_ENABLE_LIKE && $__wcf->session->getPermission('user.like.canLike') && $article->userID != $__wcf->user->userID}
<li class="jsOnly"><span class="button reactButton{if $articleLikeData[$article->articleID]|isset && $articleLikeData[$article->articleID]->reactionTypeID} active{/if}" title="{lang}wcf.reactions.react{/lang}" data-reaction-type-id="{if $articleLikeData[$article->articleID]|isset && $articleLikeData[$article->articleID]->reactionTypeID}{$articleLikeData[$article->articleID]->reactionTypeID}{else}0{/if}"><span class="icon icon16 fa-smile-o"></span> <span class="invisible">{lang}wcf.reactions.react{/lang}</span></span></li>
{/if}
{if $__wcf->session->getPermission('user.profile.canReportContent')}
new UiReactionHandler('com.woltlab.wcf.likeableArticle', {
// permissions
canReact: {if $__wcf->getUser()->userID}true{else}false{/if},
- canReactToOwnContent: {if LIKE_ALLOW_FOR_OWN_CONTENT}true{else}false{/if},
+ canReactToOwnContent: false,
canViewReactions: {if LIKE_SHOW_SUMMARY}true{else}false{/if},
// selectors
<li class="jsReportCommentComment jsOnly" data-object-id="{@$comment->commentID}"><a href="#" title="{lang}wcf.moderation.report.reportContent{/lang}" class="jsTooltip"><span class="icon icon16 fa-exclamation-triangle"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>
{/if}
- {if MODULE_LIKE && $__wcf->session->getPermission('user.like.canLike') && (LIKE_ALLOW_FOR_OWN_CONTENT || $comment->userID != $__wcf->user->userID)}
+ {if MODULE_LIKE && $__wcf->session->getPermission('user.like.canLike') && $comment->userID != $__wcf->user->userID}
<li class="jsOnly"><a href="#" class="reactButton jsTooltip {if $likeData[comment][$comment->commentID]|isset && $likeData[comment][$comment->commentID]->reactionTypeID} active{/if}" title="{lang}wcf.reactions.react{/lang}" data-reaction-type-id="{if $likeData[comment][$comment->commentID]|isset && $likeData[comment][$comment->commentID]->reactionTypeID}{$likeData[comment][$comment->commentID]->reactionTypeID}{else}0{/if}"><span class="icon icon16 fa-smile-o"></span> <span class="invisible">{lang}wcf.reactions.react{/lang}</span></a></li>
{/if}
<li class="jsReportCommentResponse jsOnly" data-object-id="{@$response->responseID}"><a href="#" title="{lang}wcf.moderation.report.reportContent{/lang}" class="jsTooltip"><span class="icon icon16 fa-exclamation-triangle"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>
{/if}
- {if MODULE_LIKE && $__wcf->session->getPermission('user.like.canLike') && (LIKE_ALLOW_FOR_OWN_CONTENT || $response->userID != $__wcf->user->userID)}<li class="jsOnly"><a href="#" class="reactButton jsTooltip {if $likeData[response][$response->responseID]|isset && $likeData[response][$response->responseID]->reactionTypeID} active{/if}" title="{lang}wcf.reactions.react{/lang}" data-reaction-type-id="{if $likeData[response][$response->responseID]|isset && $likeData[response][$response->responseID]->reactionTypeID}{$likeData[response][$response->responseID]->reactionTypeID}{else}0{/if}"><span class="icon icon16 fa-smile-o"></span> <span class="invisible">{lang}wcf.reactions.react{/lang}</span></a></li>{/if}
+ {if MODULE_LIKE && $__wcf->session->getPermission('user.like.canLike') && $response->userID != $__wcf->user->userID}<li class="jsOnly"><a href="#" class="reactButton jsTooltip {if $likeData[response][$response->responseID]|isset && $likeData[response][$response->responseID]->reactionTypeID} active{/if}" title="{lang}wcf.reactions.react{/lang}" data-reaction-type-id="{if $likeData[response][$response->responseID]|isset && $likeData[response][$response->responseID]->reactionTypeID}{$likeData[response][$response->responseID]->reactionTypeID}{else}0{/if}"><span class="icon icon16 fa-smile-o"></span> <span class="invisible">{lang}wcf.reactions.react{/lang}</span></a></li>{/if}
{event name='commentOptions'}
</ul>
define('USER_CLEANUP_NOTIFICATION_LIFETIME', 14);
define('USER_CLEANUP_ACTIVITY_EVENT_LIFETIME', 60);
define('USER_CLEANUP_PROFILE_VISITOR_LIFETIME', 60);
-define('LIKE_ALLOW_FOR_OWN_CONTENT', 1);
-define('LIKE_ENABLE_DISLIKE', 1);
+define('LIKE_ALLOW_FOR_OWN_CONTENT', 0);
+define('LIKE_ENABLE_DISLIKE', 0);
define('LIKE_SHOW_SUMMARY', 1);
define('MESSAGE_SIDEBAR_ENABLE_ONLINE_STATUS', 1);
define('MESSAGE_SIDEBAR_ENABLE_LIKES_RECEIVED', 1);
OptionEditor::import([
'like_show_summary' => 1,
- 'like_enable_dislike' => 0
]);
try {
// check if liking own content but forbidden by configuration
$this->likeableObject = $this->objectTypeProvider->getObjectByID($this->parameters['data']['objectID']);
$this->likeableObject->setObjectType($this->objectType);
- if (!LIKE_ALLOW_FOR_OWN_CONTENT && ($this->likeableObject->getUserID() == WCF::getUser()->userID)) {
+ if ($this->likeableObject->getUserID() == WCF::getUser()->userID) {
throw new PermissionDeniedException();
}
}
* @inheritDoc
*/
public function validateDislike() {
- if (!LIKE_ENABLE_DISLIKE) {
- throw new PermissionDeniedException();
- }
-
- $this->validateLike();
+ // No longer supported since 5.2.
+ throw new PermissionDeniedException();
}
/**
// check if liking own content but forbidden by configuration
$this->likeableObject = $this->objectTypeProvider->getObjectByID($this->parameters['data']['objectID']);
$this->likeableObject->setObjectType($this->objectType);
- if (!LIKE_ALLOW_FOR_OWN_CONTENT && ($this->likeableObject->getUserID() == WCF::getUser()->userID)) {
+ if ($this->likeableObject->getUserID() == WCF::getUser()->userID) {
throw new PermissionDeniedException();
}
* Loads the options file, automatically created if not exists.
*/
protected function loadOptions() {
- // the attachment module is always enabled since 5.2
+ // The attachment module is always enabled since 5.2.
// https://github.com/WoltLab/WCF/issues/2531
define('MODULE_ATTACHMENT', 1);
+ // Users cannot react to their own content since 5.2.
+ // https://github.com/WoltLab/WCF/issues/2975
+ define('LIKE_ALLOW_FOR_OWN_CONTENT', 0);
+ define('LIKE_ENABLE_DISLIKE', 0);
+
$filename = WCF_DIR.'options.inc.php';
// create options file if doesn't exist
<item name="wcf.acp.option.user_cleanup_profile_visitor_lifetime.description"><![CDATA[Zeitraum nach dem Profil-Besucher automatisch verworfen werden.]]></item>
<item name="wcf.acp.option.category.message.general.likes"><![CDATA[Reaktions-System]]></item>
<item name="wcf.acp.option.module_like"><![CDATA[Reaktions-System]]></item>
- <item name="wcf.acp.option.like_allow_for_own_content"><![CDATA[Benutzer können auf eigene Inhalte reagieren]]></item>
- <item name="wcf.acp.option.like_enable_dislike"><![CDATA[Benutzer können Inhalte disliken]]></item>
<item name="wcf.acp.option.like_show_summary"><![CDATA[Zusammenfassung anzeigen]]></item>
<item name="wcf.acp.option.module_user_profile_wall"><![CDATA[Benutzerprofil-Pinnwand]]></item>
<item name="wcf.acp.option.category.message.sidebar"><![CDATA[Seitenleiste]]></item>
<item name="wcf.acp.option.user_cleanup_profile_visitor_lifetime.description"><![CDATA[Profile visitors will be removed after the following days.]]></item>
<item name="wcf.acp.option.category.message.general.likes"><![CDATA[Likes System]]></item>
<item name="wcf.acp.option.module_like"><![CDATA[Likes system]]></item>
- <item name="wcf.acp.option.like_allow_for_own_content"><![CDATA[Users can react to their own content]]></item>
- <item name="wcf.acp.option.like_enable_dislike"><![CDATA[Users can dislike content]]></item>
<item name="wcf.acp.option.like_show_summary"><![CDATA[Display likes summary]]></item>
<item name="wcf.acp.option.module_user_profile_wall"><![CDATA[User profile wall]]></item>
<item name="wcf.acp.option.category.message.sidebar"><![CDATA[Sidebar]]></item>