]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/accountmover.php
Introduced common_location_shared() to check if location sharing is always,
[quix0rs-gnu-social.git] / lib / accountmover.php
index 3e9228994a3f16315a72db96a3eef132e46bc233..83314b49978d53ace8a732179db05a33b5f4242f 100644 (file)
@@ -86,7 +86,7 @@ class AccountMover extends QueueHandler
         $qm = QueueManager::get();
 
         foreach ($acts as $act) {
-            $qm->enqueue(array($act, $sink, $user->uri, $remote), 'actmove');
+            $qm->enqueue(array($act, $sink, $user->getUri(), $remote), 'actmove');
         }
 
         $this->log(LOG_INFO,
@@ -109,18 +109,11 @@ class AccountMover extends QueueHandler
         $svcDocUrl = null;
         $username  = null;
 
-        foreach ($xrd->links as $link) {
-            if ($link['rel'] == 'http://apinamespace.org/atom' &&
-                $link['type'] == 'application/atomsvc+xml') {
-                $svcDocUrl = $link['href'];
-                if (!empty($link['property'])) {
-                    foreach ($link['property'] as $property) {
-                        if ($property['type'] == 'http://apinamespace.org/atom/username') {
-                            $username = $property['value'];
-                            break;
-                        }
-                    }
-                }
+        $link = $xrd->links->get('http://apinamespace.org/atom', 'application/atomsvc+xml');
+        if (!is_null($link)) {
+            $svcDocUrl = $link->href;
+            if (isset($link['http://apinamespace.org/atom/username'])) {
+                $username = $link['http://apinamespace.org/atom/username'];
                 break;
             }
         }