12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class UserbyidAction extends ShowstreamAction
- {
- protected function doPreparation()
- {
-
- $this->target = Profile::getByID($this->trimmed('id'));
-
-
- if ($this->target->isLocal()) {
-
-
-
-
- $page_prefs = 'text/html,application/xhtml+xml,application/rdf+xml,application/xml;q=0.3,text/xml;q=0.2';
- $httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : null;
- $type = common_negotiate_type(common_accept_to_prefs($httpaccept),
- common_accept_to_prefs($page_prefs));
- $page = $type === 'application/rdf+xml' ? 'foaf' : 'showstream';
- $url = common_local_url($page, array('nickname' => $this->target->getNickname()));
- common_redirect($url, 303);
- }
- }
- }
|