diff options
author | Brion Vibber <brion@pobox.com> | 2010-04-06 15:22:23 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-04-06 15:22:23 -0700 |
commit | 5dc169260dc36209dd5ad0d4d4cac2bdaaefe62c (patch) | |
tree | c5fb50f7fbf6ff20b581c1ad5b50f2e19e6d7584 /actions/peopletag.php | |
parent | a3314f483ec3250b322666a769a10197fb9dfff0 (diff) | |
parent | 4bb75d1c8e22b7bfc689a9e582ef846515a90383 (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions/peopletag.php')
-rw-r--r-- | actions/peopletag.php | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/actions/peopletag.php b/actions/peopletag.php index 4ba1dc0f1..456cc21c4 100644 --- a/actions/peopletag.php +++ b/actions/peopletag.php @@ -32,8 +32,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR.'/lib/profilelist.php'; - /** * This class outputs a paginated list of profiles self-tagged with a given tag * @@ -124,8 +122,8 @@ class PeopletagAction extends Action $profile->query(sprintf($qry, $this->tag, $lim)); - $pl = new ProfileList($profile, $this); - $cnt = $pl->show(); + $ptl = new PeopleTagList($profile, $this); // pass the ammunition + $cnt = $ptl->show(); $this->pagination($this->page > 1, $cnt > PROFILES_PER_PAGE, @@ -146,3 +144,33 @@ class PeopletagAction extends Action } } + +class PeopleTagList extends ProfileList +{ + function newListItem($profile) + { + return new PeopleTagListItem($profile, $this->action); + } +} + +class PeopleTagListItem extends ProfileListItem +{ + function linkAttributes() + { + $aAttrs = parent::linkAttributes(); + + if (common_config('nofollow', 'peopletag')) { + $aAttrs['rel'] .= ' nofollow'; + } + + return $aAttrs; + } + + function homepageAttributes() + { + if (common_config('nofollow', 'peopletag')) { + $aAttrs['rel'] = 'nofollow'; + } + } +} + |