X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ftagprofile.php;h=7538d7c8b6d62bdc0d9b5d2341f1eaf5e9bb32c5;hb=a7a4eeef09ee8929bb9ca563eb2bc52d198d202f;hp=e79a80aca803396892c905da38304f04ae929381;hpb=f0d762f1968fa0ac33b39d73cc9c0225c9e8a989;p=quix0rs-gnu-social.git diff --git a/actions/tagprofile.php b/actions/tagprofile.php index e79a80aca8..7538d7c8b6 100644 --- a/actions/tagprofile.php +++ b/actions/tagprofile.php @@ -41,12 +41,11 @@ class TagprofileAction extends Action if (!$id) { $this->profile = false; } else { - $this->profile = Profile::staticGet('id', $id); + $this->profile = Profile::getKV('id', $id); if (!$this->profile) { // TRANS: Client error displayed when referring to non-existing profile ID. $this->clientError(_('No profile with that ID.')); - return false; } } @@ -55,7 +54,6 @@ class TagprofileAction extends Action // TRANS: Client error displayed when trying to tag a user that cannot be tagged. $this->clientError(_('You cannot tag this user.')); } - return true; } function handle($args) @@ -74,12 +72,12 @@ class TagprofileAction extends Action function title() { if (!$this->profile) { - // TRANS: Title for people tag form when not on a profile page. - return _('Tag a profile'); + // TRANS: Title for list form when not on a profile page. + return _('List a profile'); } - // TRANS: Title for people tag form when on a profile page. + // TRANS: Title for list form when on a profile page. // TRANS: %s is a profile nickname. - return sprintf(_('Tag %s'), $this->profile->nickname); + return sprintf(_m('ADDTOLIST','List %s'), $this->profile->nickname); } function showForm($error=null) @@ -88,13 +86,13 @@ class TagprofileAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - // TRANS: Title for people tag form when an error has occurred. + // TRANS: Title for list form when an error has occurred. $this->element('title', null, _m('TITLE','Error')); $this->elementEnd('head'); $this->elementStart('body'); $this->element('p', 'error', $error); $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); } else { $this->showPage(); } @@ -104,11 +102,11 @@ class TagprofileAction extends Action { if (Event::handle('StartShowTagProfileForm', array($this, $this->profile)) && $this->profile) { $this->elementStart('div', 'entity_profile vcard author'); - // TRANS: Header in people tag form. + // TRANS: Header in list form. $this->element('h2', null, _('User profile')); - $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE); - $this->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE), + $avatarUrl = $this->profile->avatarUrl(AVATAR_PROFILE_SIZE); + $this->element('img', array('src' => $avatarUrl, 'class' => 'photo avatar entity_depiction', 'width' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE, @@ -147,8 +145,8 @@ class TagprofileAction extends Action 'action' => common_local_url('tagprofile', array('id' => $this->profile->id)))); $this->elementStart('fieldset'); - // TRANS: Fieldset legend for people tag form. - $this->element('legend', null, _('Tag user')); + // TRANS: Fieldset legend for list form. + $this->element('legend', null, _('List user')); $this->hidden('token', common_session_token()); $this->hidden('id', $this->profile->id); @@ -158,14 +156,14 @@ class TagprofileAction extends Action $this->elementStart('li'); $tags = Profile_tag::getTagsArray($user->id, $this->profile->id, $user->id); - // TRANS: Field label on people tag form. - $this->input('tags', _m('LABEL','Tags'), + // TRANS: Field label on list form. + $this->input('tags', _m('LABEL','Lists'), ($this->arg('tags')) ? $this->arg('tags') : implode(' ', $tags), - // TRANS: Field title on people tag form. - _('Tags for this user (letters, numbers, -, ., and _), comma- or space- separated.')); + // TRANS: Field title on list form. + _('Lists for this user (letters, numbers, -, ., and _), comma- or space- separated.')); $this->elementEnd('li'); $this->elementEnd('ul'); - // TRANS: Button text to save people tags. + // TRANS: Button text to save lists. $this->submit('save', _m('BUTTON','Save')); $this->elementEnd('fieldset'); $this->elementEnd('form'); @@ -238,10 +236,10 @@ class TagprofileAction extends Action } $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); } else { - // TRANS: Success message if people tags are saved. - $this->error = _('Tags saved.'); + // TRANS: Success message if lists are saved. + $this->error = _('Lists saved.'); $this->showForm(); } @@ -257,7 +255,7 @@ class TagprofileAction extends Action $this->elementStart('div', 'instructions'); $this->element('p', null, // TRANS: Page notice. - _('Use this form to add tags to your subscribers or subscriptions.')); + _('Use this form to add your subscribers or subscriptions to lists.')); $this->elementEnd('div'); } }