From c04e3c77695ada3cd77ad9e07617be9a581e9f74 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 3 Jul 2009 10:14:02 -0400 Subject: [PATCH] only show subscribe button in profile list for local users --- lib/profilelist.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/profilelist.php b/lib/profilelist.php index a604230f85..e13d56a9a6 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -243,15 +243,20 @@ class ProfileListItem extends Widget $user = common_current_user(); if (!empty($user) && $this->profile->id != $user->id) { - $this->out->elementStart('li', 'entity_subscribe'); - if ($user->isSubscribed($this->profile)) { - $usf = new UnsubscribeForm($this->out, $this->profile); - $usf->show(); - } else { - $sf = new SubscribeForm($this->out, $this->profile); - $sf->show(); + // Is it a local user? can't remote sub from a list + // XXX: make that possible! + $other = User::staticGet('id', $this->profile->id); + if (!empty($other)) { + $this->out->elementStart('li', 'entity_subscribe'); + if ($user->isSubscribed($this->profile)) { + $usf = new UnsubscribeForm($this->out, $this->profile); + $usf->show(); + } else { + $sf = new SubscribeForm($this->out, $this->profile); + $sf->show(); + } + $this->out->elementEnd('li'); } - $this->out->elementEnd('li'); } } -- 2.39.5