move full-featured timeline to apitimelinehome.php
This commit is contained in:
parent
1ace5c400e
commit
6ff13d6828
@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* StatusNet, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Show the friends timeline
|
* Show the home timeline
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
@ -56,7 +56,7 @@ require_once INSTALLDIR . '/lib/apibareauth.php';
|
|||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ApiTimelineFriendsAction extends ApiBareAuthAction
|
class ApiTimelineHomeAction extends ApiBareAuthAction
|
||||||
{
|
{
|
||||||
var $notices = null;
|
var $notices = null;
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
|
|||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
common_debug("api friends_timeline");
|
common_debug("api home_timeline");
|
||||||
$this->user = $this->getTargetUser($this->arg('id'));
|
$this->user = $this->getTargetUser($this->arg('id'));
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
@ -114,7 +114,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
|
|||||||
$sitename = common_config('site', 'name');
|
$sitename = common_config('site', 'name');
|
||||||
$title = sprintf(_("%s and friends"), $this->user->nickname);
|
$title = sprintf(_("%s and friends"), $this->user->nickname);
|
||||||
$taguribase = common_config('integration', 'taguri');
|
$taguribase = common_config('integration', 'taguri');
|
||||||
$id = "tag:$taguribase:FriendsTimeline:" . $this->user->id;
|
$id = "tag:$taguribase:HomeTimeline:" . $this->user->id;
|
||||||
$link = common_local_url(
|
$link = common_local_url(
|
||||||
'all', array('nickname' => $this->user->nickname)
|
'all', array('nickname' => $this->user->nickname)
|
||||||
);
|
);
|
||||||
@ -137,11 +137,11 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
|
|||||||
|
|
||||||
if (isset($target_id)) {
|
if (isset($target_id)) {
|
||||||
$selfuri = common_root_url() .
|
$selfuri = common_root_url() .
|
||||||
'api/statuses/friends_timeline/' .
|
'api/statuses/home_timeline/' .
|
||||||
$target_id . '.atom';
|
$target_id . '.atom';
|
||||||
} else {
|
} else {
|
||||||
$selfuri = common_root_url() .
|
$selfuri = common_root_url() .
|
||||||
'api/statuses/friends_timeline.atom';
|
'api/statuses/home_timeline.atom';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->showAtomTimeline(
|
$this->showAtomTimeline(
|
@ -283,12 +283,13 @@ class Router
|
|||||||
array('action' => 'ApiTimelineFriends',
|
array('action' => 'ApiTimelineFriends',
|
||||||
'id' => '[a-zA-Z0-9]+',
|
'id' => '[a-zA-Z0-9]+',
|
||||||
'format' => '(xml|json|rss|atom)'));
|
'format' => '(xml|json|rss|atom)'));
|
||||||
|
|
||||||
$m->connect('api/statuses/home_timeline.:format',
|
$m->connect('api/statuses/home_timeline.:format',
|
||||||
array('action' => 'ApiTimelineFriends',
|
array('action' => 'ApiTimelineHome',
|
||||||
'format' => '(xml|json|rss|atom)'));
|
'format' => '(xml|json|rss|atom)'));
|
||||||
|
|
||||||
$m->connect('api/statuses/home_timeline/:id.:format',
|
$m->connect('api/statuses/home_timeline/:id.:format',
|
||||||
array('action' => 'ApiTimelineFriends',
|
array('action' => 'ApiTimelineHome',
|
||||||
'id' => '[a-zA-Z0-9]+',
|
'id' => '[a-zA-Z0-9]+',
|
||||||
'format' => '(xml|json|rss|atom)'));
|
'format' => '(xml|json|rss|atom)'));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user