]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
moving references to Webfinger to Discovery
authorJames Walker <walkah@walkah.net>
Thu, 25 Feb 2010 22:34:56 +0000 (17:34 -0500)
committerJames Walker <walkah@walkah.net>
Thu, 25 Feb 2010 22:34:56 +0000 (17:34 -0500)
plugins/OStatus/actions/ostatusinit.php
plugins/OStatus/actions/webfinger.php
plugins/OStatus/classes/Ostatus_profile.php

index 3f2f6368f6038b94092e8fc0090fd8cfa4c5e18f..5c85755959ae7475ffde8fad5e063f4924437fe9 100644 (file)
@@ -131,9 +131,9 @@ class OStatusInitAction extends Action
 
     function connectWebfinger($acct)
     {
-        $w = new Webfinger;
+        $disco = new Discovery;
 
-        $result = $w->lookup($acct);
+        $result = $disco->lookup($acct);
         if (!$result) {
             $this->clientError(_m("Couldn't look up OStatus account profile."));
         }
index 34336a9039bf7869b428e39f742396e2aa1c147c..fa41b244463ea2b9fa39d846c9bcc889dfeb1972 100644 (file)
@@ -40,7 +40,7 @@ class WebfingerAction extends Action
 
     function handle()
     {
-        $acct = Webfinger::normalize($this->uri);
+        $acct = Discovery::normalize($this->uri);
 
         $xrd = new XRD();
 
@@ -55,11 +55,11 @@ class WebfingerAction extends Action
 
         $xrd->subject = $this->uri;
         $xrd->alias[] = common_profile_url($nick);
-        $xrd->links[] = array('rel' => Webfinger::PROFILEPAGE,
+        $xrd->links[] = array('rel' => Discovery::PROFILEPAGE,
                               'type' => 'text/html',
                               'href' => common_profile_url($nick));
 
-        $xrd->links[] = array('rel' => Webfinger::UPDATESFROM,
+        $xrd->links[] = array('rel' => Discovery::UPDATESFROM,
                               'href' => common_local_url('ApiTimelineUser',
                                                          array('id' => $this->user->id,
                                                                'format' => 'atom')),
index f2301707764f14c970c13302dfde69a7e8a0594d..0fec8fc43d6104c6debb37b25bac245924fd4dc9 100644 (file)
@@ -1328,9 +1328,9 @@ class Ostatus_profile extends Memcached_DataObject
 
         // Now, try some discovery
 
-        $wf = new Webfinger();
+        $disco = new Discovery();
 
-        $result = $wf->lookup($addr);
+        $result = $disco->lookup($addr);
 
         if (!$result) {
             return null;
@@ -1338,13 +1338,13 @@ class Ostatus_profile extends Memcached_DataObject
 
         foreach ($result->links as $link) {
             switch ($link['rel']) {
-            case Webfinger::PROFILEPAGE:
+            case Discovery::PROFILEPAGE:
                 $profileUrl = $link['href'];
                 break;
             case 'salmon':
                 $salmonEndpoint = $link['href'];
                 break;
-            case Webfinger::UPDATESFROM:
+            case Discovery::UPDATESFROM:
                 $feedUrl = $link['href'];
                 break;
             default: