Change to use TagURI::base() instead of common_config()

I changed the way that tag: URIs are minted, so we now use the right
base. Ideally most of these would use HTTP URIs instead, but for
now at least they use the right base.
This commit is contained in:
Evan Prodromou 2010-02-20 13:31:20 -05:00
parent 61a072b3c4
commit f3b08461bd
15 changed files with 17 additions and 17 deletions

View File

@ -79,7 +79,7 @@ class ApiDirectMessageAction extends ApiAuthAction
} }
$server = common_root_url(); $server = common_root_url();
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
if ($this->arg('sent')) { if ($this->arg('sent')) {

View File

@ -93,7 +93,7 @@ class ApiGroupListAction extends ApiBareAuthAction
$sitename = common_config('site', 'name'); $sitename = common_config('site', 'name');
$title = sprintf(_("%s's groups"), $this->user->nickname); $title = sprintf(_("%s's groups"), $this->user->nickname);
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$id = "tag:$taguribase:Groups"; $id = "tag:$taguribase:Groups";
$link = common_local_url( $link = common_local_url(
'usergroups', 'usergroups',

View File

@ -88,7 +88,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
$sitename = common_config('site', 'name'); $sitename = common_config('site', 'name');
$title = sprintf(_("%s groups"), $sitename); $title = sprintf(_("%s groups"), $sitename);
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$id = "tag:$taguribase:Groups"; $id = "tag:$taguribase:Groups";
$link = common_local_url('groups'); $link = common_local_url('groups');
$subtitle = sprintf(_("groups on %s"), $sitename); $subtitle = sprintf(_("groups on %s"), $sitename);

View File

@ -110,7 +110,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
$this->user->nickname $this->user->nickname
); );
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$id = "tag:$taguribase:Favorites:" . $this->user->id; $id = "tag:$taguribase:Favorites:" . $this->user->id;
$subtitle = sprintf( $subtitle = sprintf(

View File

@ -112,7 +112,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
$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 = TagURI::base();
$id = "tag:$taguribase:FriendsTimeline:" . $this->user->id; $id = "tag:$taguribase:FriendsTimeline:" . $this->user->id;
$subtitle = sprintf( $subtitle = sprintf(

View File

@ -107,7 +107,7 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction
$sitename = common_config('site', 'name'); $sitename = common_config('site', 'name');
$avatar = $this->group->homepage_logo; $avatar = $this->group->homepage_logo;
$title = sprintf(_("%s timeline"), $this->group->nickname); $title = sprintf(_("%s timeline"), $this->group->nickname);
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$id = "tag:$taguribase:GroupTimeline:" . $this->group->id; $id = "tag:$taguribase:GroupTimeline:" . $this->group->id;
$subtitle = sprintf( $subtitle = sprintf(

View File

@ -113,7 +113,7 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
$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 = TagURI::base();
$id = "tag:$taguribase:HomeTimeline:" . $this->user->id; $id = "tag:$taguribase:HomeTimeline:" . $this->user->id;
$subtitle = sprintf( $subtitle = sprintf(

View File

@ -117,7 +117,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
_('%1$s / Updates mentioning %2$s'), _('%1$s / Updates mentioning %2$s'),
$sitename, $this->user->nickname $sitename, $this->user->nickname
); );
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$id = "tag:$taguribase:Mentions:" . $this->user->id; $id = "tag:$taguribase:Mentions:" . $this->user->id;
$link = common_local_url( $link = common_local_url(
'replies', 'replies',

View File

@ -109,7 +109,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
$sitename = common_config('site', 'name'); $sitename = common_config('site', 'name');
$sitelogo = (common_config('site', 'logo')) ? common_config('site', 'logo') : Theme::path('logo.png'); $sitelogo = (common_config('site', 'logo')) ? common_config('site', 'logo') : Theme::path('logo.png');
$title = sprintf(_("%s public timeline"), $sitename); $title = sprintf(_("%s public timeline"), $sitename);
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$id = "tag:$taguribase:PublicTimeline"; $id = "tag:$taguribase:PublicTimeline";
$link = common_root_url(); $link = common_root_url();
$subtitle = sprintf(_("%s updates from everyone!"), $sitename); $subtitle = sprintf(_("%s updates from everyone!"), $sitename);

View File

@ -109,7 +109,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction
$profile = $this->auth_user->getProfile(); $profile = $this->auth_user->getProfile();
$title = sprintf(_("Repeated to %s"), $this->auth_user->nickname); $title = sprintf(_("Repeated to %s"), $this->auth_user->nickname);
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$id = "tag:$taguribase:RepeatedToMe:" . $this->auth_user->id; $id = "tag:$taguribase:RepeatedToMe:" . $this->auth_user->id;
$link = common_local_url('all', $link = common_local_url('all',
array('nickname' => $this->auth_user->nickname)); array('nickname' => $this->auth_user->nickname));

View File

@ -112,7 +112,7 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
$profile = $this->auth_user->getProfile(); $profile = $this->auth_user->getProfile();
$title = sprintf(_("Repeats of %s"), $this->auth_user->nickname); $title = sprintf(_("Repeats of %s"), $this->auth_user->nickname);
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$id = "tag:$taguribase:RepeatsOfMe:" . $this->auth_user->id; $id = "tag:$taguribase:RepeatsOfMe:" . $this->auth_user->id;
header('Content-Type: application/atom+xml; charset=utf-8'); header('Content-Type: application/atom+xml; charset=utf-8');

View File

@ -105,7 +105,7 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction
$this->tag, $this->tag,
$sitename $sitename
); );
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$id = "tag:$taguribase:TagTimeline:".$tag; $id = "tag:$taguribase:TagTimeline:".$tag;
switch($this->format) { switch($this->format) {

View File

@ -116,7 +116,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$sitename = common_config('site', 'name'); $sitename = common_config('site', 'name');
$title = sprintf(_("%s timeline"), $this->user->nickname); $title = sprintf(_("%s timeline"), $this->user->nickname);
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$id = "tag:$taguribase:UserTimeline:" . $this->user->id; $id = "tag:$taguribase:UserTimeline:" . $this->user->id;
$link = common_local_url( $link = common_local_url(
'showstream', 'showstream',

View File

@ -245,7 +245,7 @@ class TwitapisearchatomAction extends ApiAction
'xmlns:twitter' => 'http://api.twitter.com/', 'xmlns:twitter' => 'http://api.twitter.com/',
'xml:lang' => 'en-US')); // XXX Other locales ? 'xml:lang' => 'en-US')); // XXX Other locales ?
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$this->element('id', null, "tag:$taguribase:search/$server"); $this->element('id', null, "tag:$taguribase:search/$server");
$site_uri = common_path(false); $site_uri = common_path(false);
@ -329,7 +329,7 @@ class TwitapisearchatomAction extends ApiAction
$this->elementStart('entry'); $this->elementStart('entry');
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$this->element('id', null, "tag:$taguribase:$notice->id"); $this->element('id', null, "tag:$taguribase:$notice->id");
$this->element('published', null, common_date_w3dtf($notice->created)); $this->element('published', null, common_date_w3dtf($notice->created));

View File

@ -358,7 +358,7 @@ class ApiAction extends Action
$entry['link'] = common_local_url('shownotice', array('notice' => $notice->id)); $entry['link'] = common_local_url('shownotice', array('notice' => $notice->id));
$entry['published'] = common_date_iso8601($notice->created); $entry['published'] = common_date_iso8601($notice->created);
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$entry['id'] = "tag:$taguribase:$entry[link]"; $entry['id'] = "tag:$taguribase:$entry[link]";
$entry['updated'] = $entry['published']; $entry['updated'] = $entry['published'];
@ -802,7 +802,7 @@ class ApiAction extends Action
$entry['link'] = common_local_url('showmessage', array('message' => $message->id)); $entry['link'] = common_local_url('showmessage', array('message' => $message->id));
$entry['published'] = common_date_iso8601($message->created); $entry['published'] = common_date_iso8601($message->created);
$taguribase = common_config('integration', 'taguri'); $taguribase = TagURI::base();
$entry['id'] = "tag:$taguribase:$entry[link]"; $entry['id'] = "tag:$taguribase:$entry[link]";
$entry['updated'] = $entry['published']; $entry['updated'] = $entry['published'];