<commit_before><script data-relocate="true">
	$(function() {
		WCF.Language.addObject({
			'wcf.comment.add': '{lang}wcf.comment.add{/lang}',
			'wcf.comment.button.response.add': '{lang}wcf.comment.button.response.add{/lang}',
			'wcf.comment.delete.confirmMessage': '{lang}wcf.comment.delete.confirmMessage{/lang}',
			'wcf.comment.description': '{lang}wcf.comment.description{/lang}',
			'wcf.comment.guestDialog.title': '{lang}wcf.comment.guestDialog.title{/lang}',
			'wcf.comment.more': '{lang}wcf.comment.more{/lang}',
			'wcf.comment.response.add': '{lang}wcf.comment.response.add{/lang}',
			'wcf.comment.response.more': '{lang}wcf.comment.response.more{/lang}',
			'wcf.message.error.editorAlreadyInUse': '{lang}wcf.message.error.editorAlreadyInUse{/lang}',
			'wcf.moderation.report.reportContent': '{lang}wcf.moderation.report.reportContent{/lang}',
			'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}'
		});
		
		new {if $commentHandlerClass|isset}{@$commentHandlerClass}{else}WCF.Comment.Handler{/if}('{$commentContainerID}');
		{if MODULE_LIKE && $commentList->getCommentManager()->supportsLike() && $__wcf->getSession()->getPermission('user.like.canViewLike')}
			require(['WoltLabSuite/Core/Ui/Reaction/Handler'], function(UiReactionHandler) {
				var canDislike = {if LIKE_ENABLE_DISLIKE}true{else}false{/if};
				var canLike = {if $__wcf->getUser()->userID && $__wcf->getSession()->getPermission('user.like.canLike')}true{else}false{/if};
				var canLikeOwnContent = {if LIKE_ALLOW_FOR_OWN_CONTENT}true{else}false{/if};
				
				new UiReactionHandler('com.woltlab.wcf.comment', {
					// settings
					badgeClassNames: 'separatorLeft',
					markListItemAsActive: true,
					renderAsButton: false,
					
					// permissions
					canDislike: canDislike,
					canLike: canLike,
					canLikeOwnContent: canLikeOwnContent,
					canViewSummary: false,
					
					// selectors
					containerSelector: 'li.comment',
					summaryListSelector: '.reactionSummaryList',
					isButtonGroupNavigation: true
				});
				
				
				new UiReactionHandler('com.woltlab.wcf.comment.response', {
					// settings
					badgeClassNames: 'separatorLeft',
					markListItemAsActive: true,
					renderAsButton: false,
					
					// permissions
					canDislike: canDislike,
					canLike: canLike,
					canLikeOwnContent: canLikeOwnContent,
					canViewSummary: false,
					
					// selectors
					containerSelector: '.commentResponse',
					summaryListSelector: '.reactionSummaryList',
					isButtonGroupNavigation: true
				});
			});<commit_msg>Fix comment permission bug See #2508<commit_after><script data-relocate="true">
	$(function() {
		WCF.Language.addObject({
			'wcf.comment.add': '{lang}wcf.comment.add{/lang}',
			'wcf.comment.button.response.add': '{lang}wcf.comment.button.response.add{/lang}',
			'wcf.comment.delete.confirmMessage': '{lang}wcf.comment.delete.confirmMessage{/lang}',
			'wcf.comment.description': '{lang}wcf.comment.description{/lang}',
			'wcf.comment.guestDialog.title': '{lang}wcf.comment.guestDialog.title{/lang}',
			'wcf.comment.more': '{lang}wcf.comment.more{/lang}',
			'wcf.comment.response.add': '{lang}wcf.comment.response.add{/lang}',
			'wcf.comment.response.more': '{lang}wcf.comment.response.more{/lang}',
			'wcf.message.error.editorAlreadyInUse': '{lang}wcf.message.error.editorAlreadyInUse{/lang}',
			'wcf.moderation.report.reportContent': '{lang}wcf.moderation.report.reportContent{/lang}',
			'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}'
		});
		
		new {if $commentHandlerClass|isset}{@$commentHandlerClass}{else}WCF.Comment.Handler{/if}('{$commentContainerID}');
		{if MODULE_LIKE && $commentList->getCommentManager()->supportsLike() && $__wcf->getSession()->getPermission('user.like.canViewLike') || $__wcf->getSession()->getPermission('user.like.canLike')}
			require(['WoltLabSuite/Core/Ui/Reaction/Handler'], function(UiReactionHandler) {
				var canLike = {if $__wcf->getUser()->userID && $__wcf->getSession()->getPermission('user.like.canLike')}true{else}false{/if};
				var canLikeOwnContent = {if LIKE_ALLOW_FOR_OWN_CONTENT}true{else}false{/if};
				
				new UiReactionHandler('com.woltlab.wcf.comment', {
					// settings
					badgeClassNames: 'separatorLeft',
					markListItemAsActive: true,
					renderAsButton: false,
					
					// permissions
					canLike: canLike,
					canLikeOwnContent: canLikeOwnContent,
					
					// selectors
					containerSelector: 'li.comment',
					summaryListSelector: '.reactionSummaryList',
					isButtonGroupNavigation: true
				});
				
				
				new UiReactionHandler('com.woltlab.wcf.comment.response', {
					// settings
					badgeClassNames: 'separatorLeft',
					markListItemAsActive: true,
					renderAsButton: false,
					
					// permissions
					canLike: canLike,
					canLikeOwnContent: canLikeOwnContent,
					
					// selectors
					containerSelector: '.commentResponse',
					summaryListSelector: '.reactionSummaryList',
					isButtonGroupNavigation: true
				});
			});
{'fraction_non_alphanumeric': 0.1618347895154885, 'fraction_numerical': 0.0007942811755361397, 'mean_word_length': 4.324524312896406, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6338836', 'n_tokens_mistral': 2013, 'n_tokens_neox': 1642, 'n_words': 190}