diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2008-12-08 00:55:11 -0500 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2008-12-08 00:55:11 -0500 |
commit | 9b4df5056f2dba6b6fa7ac392c2114fd3c1400a0 (patch) | |
tree | 58d4bf8057559b3175ade6f25908ce8da194091d /lib/profilelist.php | |
parent | 71b682453d558de25592bbf9633fc214e94b6067 (diff) |
add block form to subscribers list and profile page
I added a small form for blocking users to profiles in the profile
list, and also to the profile page.
I also added an action to handle the results of blocking someone.
This required some changes to the profile list class (so I could
add the block form), so I made them. And the gallery class lets its
subclasses return a subclass of ProfileList for their profile list.
darcs-hash:20081208055511-5ed1f-e2e09986bd3b9cbb6a00a0c6b94f49ea78b7bdab.gz
Diffstat (limited to 'lib/profilelist.php')
-rw-r--r-- | lib/profilelist.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/profilelist.php b/lib/profilelist.php index 67be04e10..7461f9415 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -55,12 +55,11 @@ class ProfileList { function show() { - $this->profile = $this->profile; - common_element_start('li', array('class' => 'profile_single', 'id' => 'profile-' . $this->profile->id)); $user = common_current_user(); + if ($user && $user->id != $this->profile->id) { # XXX: special-case for user looking at own # subscriptions page @@ -151,9 +150,19 @@ class ProfileList { common_element_end('div'); } + if ($user && $user->id == $this->owner->id) { + $this->show_owner_controls($profile); + } + common_element_end('li'); } + /* Override this in subclasses. */ + + function show_owner_controls($profile) { + return; + } + function highlight($text) { return htmlspecialchars($text); } |