summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/activity.php5
-rw-r--r--lib/profileaction.php35
-rw-r--r--lib/profilelist.php9
3 files changed, 31 insertions, 18 deletions
diff --git a/lib/activity.php b/lib/activity.php
index 7926d0569..7334239ec 100644
--- a/lib/activity.php
+++ b/lib/activity.php
@@ -1048,6 +1048,7 @@ class Activity
public $id; // ID of the activity
public $title; // title of the activity
public $categories = array(); // list of AtomCategory objects
+ public $enclosures = array(); // list of enclosure URL references
/**
* Turns a regular old Atom <entry> into a magical activity
@@ -1144,6 +1145,10 @@ class Activity
$this->categories[] = new AtomCategory($catEl);
}
}
+
+ foreach (ActivityUtils::getLinks($entry, 'enclosure') as $link) {
+ $this->enclosures[] = $link->getAttribute('href');
+ }
}
/**
diff --git a/lib/profileaction.php b/lib/profileaction.php
index 2d4d23265..2bda8b07c 100644
--- a/lib/profileaction.php
+++ b/lib/profileaction.php
@@ -106,27 +106,30 @@ class ProfileAction extends OwnerDesignAction
$this->elementStart('div', array('id' => 'entity_subscriptions',
'class' => 'section'));
- $this->element('h2', null, _('Subscriptions'));
+ if (Event::handle('StartShowSubscriptionsMiniList', array($this))) {
+ $this->element('h2', null, _('Subscriptions'));
- $cnt = 0;
+ $cnt = 0;
- if (!empty($profile)) {
- $pml = new ProfileMiniList($profile, $this);
- $cnt = $pml->show();
- if ($cnt == 0) {
- $this->element('p', null, _('(None)'));
+ if (!empty($profile)) {
+ $pml = new ProfileMiniList($profile, $this);
+ $cnt = $pml->show();
+ if ($cnt == 0) {
+ $this->element('p', null, _('(None)'));
+ }
}
- }
- if ($cnt > PROFILES_PER_MINILIST) {
- $this->elementStart('p');
- $this->element('a', array('href' => common_local_url('subscriptions',
- array('nickname' => $this->profile->nickname)),
- 'class' => 'more'),
- _('All subscriptions'));
- $this->elementEnd('p');
- }
+ if ($cnt > PROFILES_PER_MINILIST) {
+ $this->elementStart('p');
+ $this->element('a', array('href' => common_local_url('subscriptions',
+ array('nickname' => $this->profile->nickname)),
+ 'class' => 'more'),
+ _('All subscriptions'));
+ $this->elementEnd('p');
+ }
+ Event::handle('EndShowSubscriptionsMiniList', array($this));
+ }
$this->elementEnd('div');
}
diff --git a/lib/profilelist.php b/lib/profilelist.php
index 693cd6449..4f1e84a6a 100644
--- a/lib/profilelist.php
+++ b/lib/profilelist.php
@@ -273,13 +273,18 @@ class ProfileListItem extends Widget
$usf = new UnsubscribeForm($this->out, $this->profile);
$usf->show();
} else {
- // 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();
}
+ else {
+ $url = common_local_url('remotesubscribe',
+ array('nickname' => $this->profile->nickname));
+ $this->out->element('a', array('href' => $url,
+ 'class' => 'entity_remote_subscribe'),
+ _('Subscribe'));
+ }
}
$this->out->elementEnd('li');
}