]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/scripts/update_ostatus_profiles.php
Merged
[quix0rs-gnu-social.git] / plugins / OStatus / scripts / update_ostatus_profiles.php
index 2a32ae0491f5fc238a5da390ea842f10917d4f01..1f70bac897aecadd5581d9148d20ce2c8e7e125f 100755 (executable)
@@ -36,7 +36,7 @@ you have no backup.
 
 UPDATE_OSTATUS_PROFILES;
 
-require_once INSTALLDIR . '/scripts/commandline.inc';
+require_once INSTALLDIR . '/scripts/commandline.inc.php';
 
 /*
  * Hacky class to remove some checks and get public access to
@@ -54,7 +54,7 @@ class LooseOstatusProfile extends Ostatus_profile
      * @throws Exception on various error conditions
      * @throws OStatusShadowException if this reference would obscure a local user/group
      */
-    public static function updateProfileURL($profile_url, $hints=array())
+    public static function updateProfileURL($profile_url, array $hints=array())
     {
         $oprofile = null;
 
@@ -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";