diff --git a/actions/groupmembers.php b/actions/groupmembers.php index 6d0701239f..54f1d8dcda 100644 --- a/actions/groupmembers.php +++ b/actions/groupmembers.php @@ -238,9 +238,13 @@ class GroupMemberListItem extends ProfileListItem function homepageAttributes() { + $aAttrs = parent::linkAttributes(); + if (common_config('nofollow', 'members')) { $aAttrs['rel'] = 'nofollow'; } + + return $aAttrs; } /** diff --git a/actions/peopletag.php b/actions/peopletag.php index 5473bc1bdf..7287cfbf99 100644 --- a/actions/peopletag.php +++ b/actions/peopletag.php @@ -168,9 +168,13 @@ class PeopleTagListItem extends ProfileListItem function homepageAttributes() { + $aAttrs = parent::linkAttributes(); + if (common_config('nofollow', 'peopletag')) { $aAttrs['rel'] = 'nofollow'; } + + return $aAttrs; } } diff --git a/actions/subscribers.php b/actions/subscribers.php index 6fdf43e2cc..2845a498e9 100644 --- a/actions/subscribers.php +++ b/actions/subscribers.php @@ -181,8 +181,12 @@ class SubscribersListItem extends SubscriptionListItem function homepageAttributes() { + $aAttrs = parent::linkAttributes(); + if (common_config('nofollow', 'subscribers')) { $aAttrs['rel'] = 'nofollow'; } + + return $aAttrs; } } diff --git a/classes/User.php b/classes/User.php index 2c256301c2..1928a3c62f 100644 --- a/classes/User.php +++ b/classes/User.php @@ -548,7 +548,10 @@ class User extends Memcached_DataObject return false; } - Subscription::cancel($other, $this->getProfile()); + $self = $this->getProfile(); + if (Subscription::exists($other, $self)) { + Subscription::cancel($other, $self); + } $block->query('COMMIT'); diff --git a/lib/deluserqueuehandler.php b/lib/deluserqueuehandler.php index 4a1233a5ef..7103039382 100644 --- a/lib/deluserqueuehandler.php +++ b/lib/deluserqueuehandler.php @@ -49,9 +49,13 @@ class DelUserQueueHandler extends QueueHandler return true; } - if (!$user->hasRole(Profile_role::DELETED)) { - common_log(LOG_INFO, "User {$user->nickname} is not pending deletion; aborting."); - return true; + try { + if (!$user->hasRole(Profile_role::DELETED)) { + common_log(LOG_INFO, "User {$user->nickname} is not pending deletion; aborting."); + return true; + } + } catch (UserNoProfileException $unp) { + common_log(LOG_INFO, "Deleting user {$user->nickname} with no profile... probably a good idea!"); } $notice = $this->getNextBatch($user);