From 6ff13d6828d01a142b60b4254c07f6f9ad3f16ba Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 14 Dec 2009 16:10:16 -0500 Subject: [PATCH] move full-featured timeline to apitimelinehome.php --- .../{apitimelinefriends.php => apitimelinehome.php} | 12 ++++++------ lib/router.php | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) rename actions/{apitimelinefriends.php => apitimelinehome.php} (95%) diff --git a/actions/apitimelinefriends.php b/actions/apitimelinehome.php similarity index 95% rename from actions/apitimelinefriends.php rename to actions/apitimelinehome.php index 09ba7a9691..5f5ea37b13 100644 --- a/actions/apitimelinefriends.php +++ b/actions/apitimelinehome.php @@ -2,7 +2,7 @@ /** * StatusNet, the distributed open-source microblogging tool * - * Show the friends timeline + * Show the home timeline * * PHP version 5 * @@ -56,7 +56,7 @@ require_once INSTALLDIR . '/lib/apibareauth.php'; * @link http://status.net/ */ -class ApiTimelineFriendsAction extends ApiBareAuthAction +class ApiTimelineHomeAction extends ApiBareAuthAction { var $notices = null; @@ -72,7 +72,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction function prepare($args) { parent::prepare($args); - common_debug("api friends_timeline"); + common_debug("api home_timeline"); $this->user = $this->getTargetUser($this->arg('id')); if (empty($this->user)) { @@ -114,7 +114,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction $sitename = common_config('site', 'name'); $title = sprintf(_("%s and friends"), $this->user->nickname); $taguribase = common_config('integration', 'taguri'); - $id = "tag:$taguribase:FriendsTimeline:" . $this->user->id; + $id = "tag:$taguribase:HomeTimeline:" . $this->user->id; $link = common_local_url( 'all', array('nickname' => $this->user->nickname) ); @@ -137,11 +137,11 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction if (isset($target_id)) { $selfuri = common_root_url() . - 'api/statuses/friends_timeline/' . + 'api/statuses/home_timeline/' . $target_id . '.atom'; } else { $selfuri = common_root_url() . - 'api/statuses/friends_timeline.atom'; + 'api/statuses/home_timeline.atom'; } $this->showAtomTimeline( diff --git a/lib/router.php b/lib/router.php index 8f68f86ac7..474e05996f 100644 --- a/lib/router.php +++ b/lib/router.php @@ -283,12 +283,13 @@ class Router array('action' => 'ApiTimelineFriends', 'id' => '[a-zA-Z0-9]+', 'format' => '(xml|json|rss|atom)')); + $m->connect('api/statuses/home_timeline.:format', - array('action' => 'ApiTimelineFriends', + array('action' => 'ApiTimelineHome', 'format' => '(xml|json|rss|atom)')); $m->connect('api/statuses/home_timeline/:id.:format', - array('action' => 'ApiTimelineFriends', + array('action' => 'ApiTimelineHome', 'id' => '[a-zA-Z0-9]+', 'format' => '(xml|json|rss|atom)'));