12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
- if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
- }
- class ProfiletagbyidAction extends Action
- {
-
- var $peopletag = null;
-
- function isReadOnly($args)
- {
- return true;
- }
- function prepare(array $args = array())
- {
- parent::prepare($args);
- $id = $this->arg('id');
- $tagger_id = $this->arg('tagger_id');
- if (!$id) {
-
- $this->clientError(_('No ID.'));
- }
- common_debug("Peopletag id $id by user id $tagger_id");
- $this->peopletag = Profile_list::getKV('id', $id);
- if (!$this->peopletag) {
-
- $this->clientError(_('No such list.'), 404);
- }
- $user = User::getKV('id', $tagger_id);
- if (!$user) {
-
- common_redirect($this->peopletag->permalink(), 301);
- }
- return true;
- }
-
- function handle()
- {
- common_redirect($this->peopletag->homeUrl(), 303);
- }
- }
|