X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fprofileaction.php;h=64087cf3126a60efc6c0f3050217020e192f94c7;hb=586fb5a5175d7a10f5f78dd026434e48202e5451;hp=bdcd575b6b6b946cb5fa2ce2390960b4b60cd0f9;hpb=2addf8e456f96c60de4edabf2409c4ec49013aab;p=quix0rs-gnu-social.git diff --git a/lib/profileaction.php b/lib/profileaction.php index bdcd575b6b..64087cf312 100644 --- a/lib/profileaction.php +++ b/lib/profileaction.php @@ -55,7 +55,7 @@ abstract class ProfileAction extends ManagedAction $nickname = common_canonical_nickname($nickname_arg); // Permanent redirect on non-canonical nickname - if ($nickname_arg != $nickname) { + if ($nickname_arg !== $nickname) { $args = array('nickname' => $nickname); if ($this->arg('page') && $this->arg('page') != 1) { $args['page'] = $this->arg['page']; @@ -83,7 +83,7 @@ abstract class ProfileAction extends ManagedAction // this will call ->doPreparation() which child classes use to set $this->target parent::prepare($args); - if ($this->target->hasRole(Profile_role::SILENCED) + if ($this->target->isPerson() && $this->target->hasRole(Profile_role::SILENCED) && (!$this->scoped instanceof Profile || !$this->scoped->hasRight(Right::SILENCEUSER))) { throw new ClientException(_('This profile has been silenced by site moderators'), 403); } @@ -336,23 +336,3 @@ abstract class ProfileAction extends ManagedAction } } } - -class SubscribersMiniList extends ProfileMiniList -{ - function newListItem($profile) - { - return new SubscribersMiniListItem($profile, $this->action); - } -} - -class SubscribersMiniListItem extends ProfileMiniListItem -{ - function linkAttributes() - { - $aAttrs = parent::linkAttributes(); - if (common_config('nofollow', 'subscribers')) { - $aAttrs['rel'] .= ' nofollow'; - } - return $aAttrs; - } -}