git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit e40044e2 authored by mmn's avatar mmn

Further static declarations of functions

Validate could probably be replaced with filter_var if desired (PHP>=5.2.0)
parent d5f82bb0
......@@ -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;
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment