From: Mikael Nordfeldth <mmn@hethane.se>
Date: Mon, 19 Aug 2013 12:26:44 +0000 (+0200)
Subject: Further static declarations of functions
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e40044e2fa40cb895ef2825de606c700877ae9c4;p=quix0rs-gnu-social.git

Further static declarations of functions

Validate could probably be replaced with filter_var if desired (PHP>=5.2.0)
---

diff --git a/lib/statusnet.php b/lib/statusnet.php
index 5917249575..ac7784eed1 100644
--- a/lib/statusnet.php
+++ b/lib/statusnet.php
@@ -313,7 +313,7 @@ class StatusNet
         $config = array_merge($config, $settings);
     }
 
-    protected function _sn_to_path($sn)
+    protected static function _sn_to_path($sn)
     {
         $past_root = substr($sn, 1);
         $last_slash = strrpos($past_root, '/');
@@ -331,7 +331,7 @@ class StatusNet
      *
      * @throws NoConfigException
      */
-    protected function loadConfigFile($conffile=null)
+    protected static function loadConfigFile($conffile=null)
     {
         global $_server, $_path, $config;
 
diff --git a/plugins/OStatus/actions/pushhub.php b/plugins/OStatus/actions/pushhub.php
index 6e0968bd55..1c19c7e52e 100644
--- a/plugins/OStatus/actions/pushhub.php
+++ b/plugins/OStatus/actions/pushhub.php
@@ -203,7 +203,8 @@ class PushHubAction extends Action
         $url = $this->arg($arg);
         $params = array('domain_check' => false, // otherwise breaks my local tests :P
                         'allowed_schemes' => array('http', 'https'));
-        if (Validate::uri($url, $params)) {
+        $validate = new Validate;
+        if ($validate->uri($url, $params)) {
             return $url;
         } else {
             // TRANS: Client exception.