}
function show()
+ {
+ $this->startList();
+ $cnt = $this->showProfiles();
+ $this->endList();
+ return $cnt;
+ }
+
+ function startList()
{
$this->out->elementStart('ul', 'profiles');
+ }
+
+ function endList()
+ {
+ $this->out->elementEnd('ul');
+ }
+ function showProfiles()
+ {
$cnt = 0;
while ($this->profile->fetch()) {
$pli->show();
}
- $this->out->elementEnd('ul');
-
return $cnt;
}
$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)) {
+ $sf = new SubscribeForm($this->out, $this->profile);
+ $sf->show();
+ }
}
$this->out->elementEnd('li');
}