]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Further static declarations of functions
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 19 Aug 2013 12:26:44 +0000 (14:26 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 19 Aug 2013 12:26:44 +0000 (14:26 +0200)
Validate could probably be replaced with filter_var if desired (PHP>=5.2.0)

lib/statusnet.php
plugins/OStatus/actions/pushhub.php

index 591724957559cf8a235089f1435e2ad4fcc47dc1..ac7784eed1f28ef39803fb1528d81c8e65a5cd59 100644 (file)
@@ -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;
 
index 6e0968bd55f8daaac2a564152d477263811a7024..1c19c7e52e01327e97b623b0b602ddc1dc451ed5 100644 (file)
@@ -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.