summaryrefslogtreecommitdiff
path: root/lib/profilelist.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-11-20 19:20:38 -0500
committerEvan Prodromou <evan@prodromou.name>2008-11-20 19:20:38 -0500
commit6dac9870bbc48d12747285579603dabf0bdcbf7a (patch)
treed324b35dbaf57f71f6c5f5d4d79495ae54add0b6 /lib/profilelist.php
parent171bedf24bca7bd195dd4a8ee79cb3f04e6de5d5 (diff)
tag other users
darcs-hash:20081121002038-84dde-2d9800f8c0ad3d22d13ca7b497f2914c9d9719fd.gz
Diffstat (limited to 'lib/profilelist.php')
-rw-r--r--lib/profilelist.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/profilelist.php b/lib/profilelist.php
index 17ad5099c..8c7f2abd7 100644
--- a/lib/profilelist.php
+++ b/lib/profilelist.php
@@ -120,6 +120,40 @@ class ProfileList {
}
common_element_end('p');
}
+
+ $user = common_current_user();
+
+ $action = NULL;
+
+ if ($user->isSubscribed($profile)) {
+ $action = 'subscriptions';
+ } else if (Subscription::pkeyGet(array('subscriber' => $profile->id,
+ 'subscribed' => $user->id))) {
+ $action = 'subscribers';
+ }
+
+
+ if ($action) {
+ $tags = Profile_tag::getTags($user->id, $profile->id);
+
+ if ($tags) {
+ common_element_start('p', 'subtags');
+
+ foreach ($tags as $tag) {
+ common_element('a', array('href' => common_local_url($action,
+ array('nickname' => $user->nickname,
+ 'tag' => $tag))),
+ $tag);
+ }
+
+ common_element_end('p');
+ }
+
+ common_element('a', array('href' => 'tagother',
+ 'id' => $profile->id,
+ 'class' => 'tagother'),
+ _('Tag'));
+ }
common_element_end('li');
}