]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't statically call Validate functions
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 7 Jul 2015 17:30:14 +0000 (19:30 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 7 Jul 2015 17:30:14 +0000 (19:30 +0200)
lib/activityutils.php

index d4c01232ec283e8e97ae5d54dcb96040de37df60..f3383efda5b4db936a75e8611a09147aa9a0cfc9 100644 (file)
@@ -281,19 +281,20 @@ class ActivityUtils
     static function validateUri($uri)
     {
         // Check mailto: URIs first
+        $validate = new Validate();
 
         if (preg_match('/^mailto:(.*)$/', $uri, $match)) {
-            return Validate::email($match[1], common_config('email', 'check_domain'));
+            return $validate->email($match[1], common_config('email', 'check_domain'));
         }
 
-        if (Validate::uri($uri)) {
+        if ($validate->uri($uri)) {
             return true;
         }
 
         // Possibly an upstream bug; tag: URIs aren't validated properly
         // unless you explicitly ask for them. All other schemes are accepted
         // for basic URI validation without asking.
-        if (Validate::uri($uri, array('allowed_scheme' => array('tag')))) {
+        if ($validate->uri($uri, array('allowed_scheme' => array('tag')))) {
             return true;
         }