summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-07-03 10:14:02 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-07-03 10:14:02 -0400
commitc04e3c77695ada3cd77ad9e07617be9a581e9f74 (patch)
tree534f25550d8c3bdcd5fa792462ca5ea0c75faeec
parent72d0ee4e2546a789728ee6d2750a2eed560d265f (diff)
only show subscribe button in profile list for local users
-rw-r--r--lib/profilelist.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/profilelist.php b/lib/profilelist.php
index a604230f8..e13d56a9a 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');
}
}