X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpeopletag.php;h=32652f75518f1a34ba548e574ccc062bfe88c5a5;hb=a21a17263956808e074fb62551300c5d6297387b;hp=4ba1dc0f1f71327aba61394b74f4192a3f8171be;hpb=26b03240271d061177a258dbae46bc384dbc9d6a;p=quix0rs-gnu-social.git diff --git a/actions/peopletag.php b/actions/peopletag.php index 4ba1dc0f1f..32652f7551 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,37 @@ 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() + { + $aAttrs = parent::linkAttributes(); + + if (common_config('nofollow', 'peopletag')) { + $aAttrs['rel'] = 'nofollow'; + } + + return $aAttrs; + } +} +