]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Change to use TagURI::base() instead of common_config()
authorEvan Prodromou <evan@status.net>
Sat, 20 Feb 2010 18:31:20 +0000 (13:31 -0500)
committerEvan Prodromou <evan@status.net>
Sat, 20 Feb 2010 18:31:20 +0000 (13:31 -0500)
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.

15 files changed:
actions/apidirectmessage.php
actions/apigrouplist.php
actions/apigrouplistall.php
actions/apitimelinefavorites.php
actions/apitimelinefriends.php
actions/apitimelinegroup.php
actions/apitimelinehome.php
actions/apitimelinementions.php
actions/apitimelinepublic.php
actions/apitimelineretweetedtome.php
actions/apitimelineretweetsofme.php
actions/apitimelinetag.php
actions/apitimelineuser.php
actions/twitapisearchatom.php
lib/api.php

index 5fbc46518b2f5ec884d2bad3b81c01a52ac25a15..5355acf8253805796cfa5411a857b8a5947d2310 100644 (file)
@@ -79,7 +79,7 @@ class ApiDirectMessageAction extends ApiAuthAction
         }
 
         $server   = common_root_url();
-        $taguribase = common_config('integration', 'taguri');
+        $taguribase = TagURI::base();
 
         if ($this->arg('sent')) {
 
index 66b67a030e0899bf3aceb60e6ae568d748d6af59..605b3823261338bcf750b5c1a74ad9c5fae28983 100644 (file)
@@ -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',
index 1921c1f193f3396e4c5d42c2007515487b649280..d2ef2978aa5427cf1e0ec5dfb6b65b8332e48e2e 100644 (file)
@@ -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);
index f7f900ddfb5d6382f70c4a1752de799f2473038d..c89d02247acda2edbfcff97d87d5bb9f9c2e860b 100644 (file)
@@ -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(
index 0af04fe4fb2cef71c07b1ce90528e4016806a349..2db76857e3c7615d43647f24ad27f7867a33fcd8 100644 (file)
@@ -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(
index 3c74e36b566ec0c964d16c7a1d5127a0bc6a71cf..1d0c4afdd0cf812487822159364f5f83191514ba 100644 (file)
@@ -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(
index ae41680702fd6484349eba4ff178edd589abdc1d..0c72f4020c47d77229bb798752bb482dbaac25c3 100644 (file)
@@ -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(
index d2e31d0bdd095fe40e592b98647dd14ee50a5689..a39c63346abfa2dc990c8a2c806fed835c1924b7 100644 (file)
@@ -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',
index c1fa72a3ee372f72e944931f86c6480bff17aabc..1ff0fd26172892defc5d48c047fe9da50ffb4423 100644 (file)
@@ -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);
index e47bc30b854cb9a93e69cd2d229186668a5964e4..73e35c86bf81a2ecb8c7d88b661760f1891dcb2c 100644 (file)
@@ -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));
index 26706a75e7650c1c65717bd79237676e635d36b5..c77912fd0f24e209bed482232be7110eb7dd45be 100644 (file)
@@ -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');
index 5b6ded4c048d6b08fe77838b2ced98b674484e51..a29061fccfcbc50d35eef9c27ee3e79ad94ea3c1 100644 (file)
@@ -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) {
index 9f7ec4c2363ab7bdac8490f7796c3fd04c377327..3e849cc786c56b69c77b67c5ae6eee3685cdbd8b 100644 (file)
@@ -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',
index baed2a0c7c24107cb15731489fc312974ea267c6..e389ddec84f43b2bf44428d7bbf99314e19eed6c 100644 (file)
@@ -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));
index 22eef7436dfc8ac1f010882f699786e480ff1b8a..0bcf4cc21afbdc870aee26b5e307b62ccc66db8a 100644 (file)
@@ -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'];