Fixed follow/block buttons
authorAlexander Ebert <ebert@woltlab.com>
Mon, 25 Apr 2016 13:57:19 +0000 (15:57 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 25 Apr 2016 13:57:19 +0000 (15:57 +0200)
com.woltlab.wcf/templates/userInformationButtons.tpl
wcfsetup/install/files/js/WCF.User.js

index e53dfc0be3b23bfe2c7a1a8817e9a598c3933c4b..b681b6660b2b355830e5c08c3f69778b1d7021b1 100644 (file)
                                {/if}
                                
                                {if $__wcf->user->userID && $user->userID != $__wcf->user->userID}
-                                       {if $__wcf->getUserProfileHandler()->isFollowing($user->userID)}
-                                               <li class="jsOnly"><a href="#" data-following="1" data-object-id="{@$user->userID}" class="jsFollowButton jsTooltip" title="{lang}wcf.user.button.unfollow{/lang}"><span class="icon icon16 fa-minus"></span> <span class="invisible">{lang}wcf.user.button.unfollow{/lang}</span></a></li>
-                                       {else}
-                                               <li class="jsOnly"><a href="#" data-following="0" data-object-id="{@$user->userID}" class="jsFollowButton jsTooltip" title="{lang}wcf.user.button.follow{/lang}"><span class="icon icon16 fa-plus"></span> <span class="invisible">{lang}wcf.user.button.follow{/lang}</span></a></li>
+                                       {if !$user->isIgnoredUser($__wcf->user->userID)}
+                                               {if $__wcf->getUserProfileHandler()->isFollowing($user->userID)}
+                                                       <li class="jsOnly"><a href="#" data-following="1" data-object-id="{@$user->userID}" class="jsFollowButton jsTooltip" title="{lang}wcf.user.button.unfollow{/lang}"><span class="icon icon16 fa-minus"></span> <span class="invisible">{lang}wcf.user.button.unfollow{/lang}</span></a></li>
+                                               {else}
+                                                       <li class="jsOnly"><a href="#" data-following="0" data-object-id="{@$user->userID}" class="jsFollowButton jsTooltip" title="{lang}wcf.user.button.follow{/lang}"><span class="icon icon16 fa-plus"></span> <span class="invisible">{lang}wcf.user.button.follow{/lang}</span></a></li>
+                                               {/if}
                                        {/if}
                                        
-                                       {*if !$user->getPermission('user.profile.cannotBeIgnored')*}{*disabled for performance reasons*}
+                                       {if !$user->getPermission('user.profile.cannotBeIgnored')}
                                                {if $__wcf->getUserProfileHandler()->isIgnoredUser($user->userID)}
                                                        <li class="jsOnly"><a href="#" data-ignored="1" data-object-id="{@$user->userID}" class="jsIgnoreButton jsTooltip" title="{lang}wcf.user.button.unignore{/lang}"><span class="icon icon16 fa-circle-o"></span> <span class="invisible">{lang}wcf.user.button.unignore{/lang}</span></a></li>
                                                {else}
                                                        <li class="jsOnly"><a href="#" data-ignored="0" data-object-id="{@$user->userID}" class="jsIgnoreButton jsTooltip" title="{lang}wcf.user.button.ignore{/lang}"><span class="icon icon16 fa-ban"></span> <span class="invisible">{lang}wcf.user.button.ignore{/lang}</span></a></li>
                                                {/if}
-                                       {*/if*}
+                                       {/if}
                                {/if}
                                
                                {event name='buttons'}
index 019fcbc6a2d15f2b0b7d60d2df3c33501aad24b5..5135e44cfd435f174ee8a6168107070f731198d6 100644 (file)
@@ -2190,7 +2190,7 @@ WCF.User.Action.Ignore = Class.extend({
                        'className': 'wcf\\data\\user\\ignore\\UserIgnoreAction',
                        'parameters': {
                                data: {
-                                       ignoreUserID: this._userID
+                                       userID: this._userID
                                }
                        }
                });