Further static declarations of functions

Validate could probably be replaced with filter_var if desired (PHP>=5.2.0)
This commit is contained in:
Mikael Nordfeldth 2013-08-19 14:26:44 +02:00
parent d5f82bb051
commit e40044e2fa
2 changed files with 4 additions and 3 deletions

View File

@ -313,7 +313,7 @@ class StatusNet
$config = array_merge($config, $settings); $config = array_merge($config, $settings);
} }
protected function _sn_to_path($sn) protected static function _sn_to_path($sn)
{ {
$past_root = substr($sn, 1); $past_root = substr($sn, 1);
$last_slash = strrpos($past_root, '/'); $last_slash = strrpos($past_root, '/');
@ -331,7 +331,7 @@ class StatusNet
* *
* @throws NoConfigException * @throws NoConfigException
*/ */
protected function loadConfigFile($conffile=null) protected static function loadConfigFile($conffile=null)
{ {
global $_server, $_path, $config; global $_server, $_path, $config;

View File

@ -203,7 +203,8 @@ class PushHubAction extends Action
$url = $this->arg($arg); $url = $this->arg($arg);
$params = array('domain_check' => false, // otherwise breaks my local tests :P $params = array('domain_check' => false, // otherwise breaks my local tests :P
'allowed_schemes' => array('http', 'https')); 'allowed_schemes' => array('http', 'https'));
if (Validate::uri($url, $params)) { $validate = new Validate;
if ($validate->uri($url, $params)) {
return $url; return $url;
} else { } else {
// TRANS: Client exception. // TRANS: Client exception.