]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/scripts/update_ostatus_profiles.php
Merge remote-tracking branch 'upstream/master' into nightly
[quix0rs-gnu-social.git] / plugins / OStatus / scripts / update_ostatus_profiles.php
index 2a32ae0491f5fc238a5da390ea842f10917d4f01..45ee856264b44938d88f40647b75e615fe790a70 100755 (executable)
@@ -74,7 +74,7 @@ class LooseOstatusProfile extends Ostatus_profile
 
         // Check if we have a non-canonical URL
 
-        $finalUrl = $response->getUrl();
+        $finalUrl = $response->getEffectiveUrl();
 
         if ($finalUrl != $profile_url) {
             $hints['profileurl'] = $finalUrl;
@@ -207,10 +207,11 @@ class LooseOstatusProfile extends Ostatus_profile
 function pullOstatusProfile($uri) {
 
     $oprofile = null;
+    $validate = new Validate();
 
-    if (Validate::email($uri)) {
+    if ($validate->email($uri)) {
         $oprofile = LooseOstatusProfile::updateWebfinger($uri);
-    } else if (Validate::uri($uri)) {
+    } else if ($validate->uri($uri)) {
         $oprofile = LooseOstatusProfile::updateProfileURL($uri);
     } else {
         print "Sorry, we could not reach the address: $uri\n";