X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOStatus%2Factions%2Fostatussub.php;h=a7726e687250321666cbaed4d349cb4f29035088;hb=4ab995dd1ef9b1b4d22f27223a7d28b12895ff93;hp=493b519657de346ad64991d97390b9fe76ad300c;hpb=5a6f6162061985c9d0e67b7d25b94b5a53205ace;p=quix0rs-gnu-social.git diff --git a/plugins/OStatus/actions/ostatussub.php b/plugins/OStatus/actions/ostatussub.php index 493b519657..a7726e6872 100644 --- a/plugins/OStatus/actions/ostatussub.php +++ b/plugins/OStatus/actions/ostatussub.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} /** * Key UI methods: @@ -161,65 +163,41 @@ class OStatusSubAction extends Action } $this->elementStart('div', 'entity_profile vcard'); - $this->elementStart('dl', 'entity_depiction'); - $this->element('dt', null, _m('Photo')); - $this->elementStart('dd'); $this->element('img', array('src' => $avatar, - 'class' => 'photo avatar', + 'class' => 'photo avatar entity_depiction', 'width' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE, 'alt' => $nickname)); - $this->elementEnd('dd'); - $this->elementEnd('dl'); - $this->elementStart('dl', 'entity_nickname'); - $this->element('dt', null, _m('Nickname')); - $this->elementStart('dd'); - $hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname'; + $hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname entity_nickname'; $this->elementStart('a', array('href' => $profile, 'class' => 'url '.$hasFN)); $this->raw($nickname); $this->elementEnd('a'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); if (!is_null($fullname)) { - $this->elementStart('dl', 'entity_fn'); - $this->elementStart('dd'); - $this->elementStart('span', 'fn'); + $this->elementStart('div', 'fn entity_fn'); $this->raw($fullname); - $this->elementEnd('span'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } + if (!is_null($location)) { - $this->elementStart('dl', 'entity_location'); - $this->element('dt', null, _m('Location')); - $this->elementStart('dd', 'label'); + $this->elementStart('div', 'label entity_location'); $this->raw($location); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } if (!is_null($homepage)) { - $this->elementStart('dl', 'entity_url'); - $this->element('dt', null, _m('URL')); - $this->elementStart('dd'); $this->elementStart('a', array('href' => $homepage, - 'class' => 'url')); + 'class' => 'url entity_url')); $this->raw($homepage); $this->elementEnd('a'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } if (!is_null($note)) { - $this->elementStart('dl', 'entity_note'); - $this->element('dt', null, _m('Note')); - $this->elementStart('dd', 'note'); + $this->elementStart('div', 'note entity_note'); $this->raw($note); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } $this->elementEnd('div'); } @@ -292,10 +270,13 @@ class OStatusSubAction extends Action function validateRemoteProfile() { + // Send us to the respective subscription form for conf if ($this->oprofile->isGroup()) { - // Send us to the group subscription form for conf $target = common_local_url('ostatusgroup', array(), array('profile' => $this->profile_uri)); common_redirect($target, 303); + } else if ($this->oprofile->isPeopletag()) { + $target = common_local_url('ostatuspeopletag', array(), array('profile' => $this->profile_uri)); + common_redirect($target, 303); } } @@ -364,6 +345,7 @@ class OStatusSubAction extends Action // CSRF protection $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->showForm(_m('There was a problem with your session token. '. 'Try again, please.')); return;