X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fprofilelist.php;h=774538a4b611de3a892c77c313b14ba2bb4a3088;hb=ada615d3ca76a79cc0e575d8d3ce43b9dfefaa7c;hp=e2faf10af48ed16d1fcd5fb08726c90628b6a2fa;hpb=c2ba727d6154394fe234e9297b430ac69fd24c88;p=quix0rs-gnu-social.git diff --git a/lib/profilelist.php b/lib/profilelist.php index e2faf10af4..774538a4b6 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -61,9 +61,25 @@ class ProfileList extends Widget } 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()) { @@ -75,8 +91,6 @@ class ProfileList extends Widget $pli->show(); } - $this->out->elementEnd('ul'); - return $cnt; } @@ -234,8 +248,13 @@ class ProfileListItem extends Widget $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'); }