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:
parent
61a072b3c4
commit
f3b08461bd
@ -79,7 +79,7 @@ class ApiDirectMessageAction extends ApiAuthAction
|
||||
}
|
||||
|
||||
$server = common_root_url();
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
|
||||
if ($this->arg('sent')) {
|
||||
|
||||
|
@ -93,7 +93,7 @@ class ApiGroupListAction extends ApiBareAuthAction
|
||||
|
||||
$sitename = common_config('site', 'name');
|
||||
$title = sprintf(_("%s's groups"), $this->user->nickname);
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:Groups";
|
||||
$link = common_local_url(
|
||||
'usergroups',
|
||||
|
@ -88,7 +88,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
|
||||
|
||||
$sitename = common_config('site', 'name');
|
||||
$title = sprintf(_("%s groups"), $sitename);
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:Groups";
|
||||
$link = common_local_url('groups');
|
||||
$subtitle = sprintf(_("groups on %s"), $sitename);
|
||||
|
@ -110,7 +110,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
|
||||
$this->user->nickname
|
||||
);
|
||||
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:Favorites:" . $this->user->id;
|
||||
|
||||
$subtitle = sprintf(
|
||||
|
@ -112,7 +112,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
|
||||
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
|
||||
$sitename = common_config('site', 'name');
|
||||
$title = sprintf(_("%s and friends"), $this->user->nickname);
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:FriendsTimeline:" . $this->user->id;
|
||||
|
||||
$subtitle = sprintf(
|
||||
|
@ -107,7 +107,7 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction
|
||||
$sitename = common_config('site', 'name');
|
||||
$avatar = $this->group->homepage_logo;
|
||||
$title = sprintf(_("%s timeline"), $this->group->nickname);
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:GroupTimeline:" . $this->group->id;
|
||||
|
||||
$subtitle = sprintf(
|
||||
|
@ -113,7 +113,7 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
|
||||
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
|
||||
$sitename = common_config('site', 'name');
|
||||
$title = sprintf(_("%s and friends"), $this->user->nickname);
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:HomeTimeline:" . $this->user->id;
|
||||
|
||||
$subtitle = sprintf(
|
||||
|
@ -117,7 +117,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
|
||||
_('%1$s / Updates mentioning %2$s'),
|
||||
$sitename, $this->user->nickname
|
||||
);
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:Mentions:" . $this->user->id;
|
||||
$link = common_local_url(
|
||||
'replies',
|
||||
|
@ -109,7 +109,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
|
||||
$sitename = common_config('site', 'name');
|
||||
$sitelogo = (common_config('site', 'logo')) ? common_config('site', 'logo') : Theme::path('logo.png');
|
||||
$title = sprintf(_("%s public timeline"), $sitename);
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:PublicTimeline";
|
||||
$link = common_root_url();
|
||||
$subtitle = sprintf(_("%s updates from everyone!"), $sitename);
|
||||
|
@ -109,7 +109,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction
|
||||
$profile = $this->auth_user->getProfile();
|
||||
|
||||
$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;
|
||||
$link = common_local_url('all',
|
||||
array('nickname' => $this->auth_user->nickname));
|
||||
|
@ -112,7 +112,7 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
|
||||
$profile = $this->auth_user->getProfile();
|
||||
|
||||
$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;
|
||||
|
||||
header('Content-Type: application/atom+xml; charset=utf-8');
|
||||
|
@ -105,7 +105,7 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction
|
||||
$this->tag,
|
||||
$sitename
|
||||
);
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:TagTimeline:".$tag;
|
||||
|
||||
switch($this->format) {
|
||||
|
@ -116,7 +116,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
||||
|
||||
$sitename = common_config('site', 'name');
|
||||
$title = sprintf(_("%s timeline"), $this->user->nickname);
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:UserTimeline:" . $this->user->id;
|
||||
$link = common_local_url(
|
||||
'showstream',
|
||||
|
@ -245,7 +245,7 @@ class TwitapisearchatomAction extends ApiAction
|
||||
'xmlns:twitter' => 'http://api.twitter.com/',
|
||||
'xml:lang' => 'en-US')); // XXX Other locales ?
|
||||
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$this->element('id', null, "tag:$taguribase:search/$server");
|
||||
|
||||
$site_uri = common_path(false);
|
||||
@ -329,7 +329,7 @@ class TwitapisearchatomAction extends ApiAction
|
||||
|
||||
$this->elementStart('entry');
|
||||
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
|
||||
$this->element('id', null, "tag:$taguribase:$notice->id");
|
||||
$this->element('published', null, common_date_w3dtf($notice->created));
|
||||
|
@ -358,7 +358,7 @@ class ApiAction extends Action
|
||||
$entry['link'] = common_local_url('shownotice', array('notice' => $notice->id));
|
||||
$entry['published'] = common_date_iso8601($notice->created);
|
||||
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
$entry['id'] = "tag:$taguribase:$entry[link]";
|
||||
|
||||
$entry['updated'] = $entry['published'];
|
||||
@ -802,7 +802,7 @@ class ApiAction extends Action
|
||||
$entry['link'] = common_local_url('showmessage', array('message' => $message->id));
|
||||
$entry['published'] = common_date_iso8601($message->created);
|
||||
|
||||
$taguribase = common_config('integration', 'taguri');
|
||||
$taguribase = TagURI::base();
|
||||
|
||||
$entry['id'] = "tag:$taguribase:$entry[link]";
|
||||
$entry['updated'] = $entry['published'];
|
||||
|
Loading…
Reference in New Issue
Block a user