diff options
Diffstat (limited to 'inc/SafeFN.class.php')
-rw-r--r-- | inc/SafeFN.class.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/inc/SafeFN.class.php b/inc/SafeFN.class.php index ab05b9eae..b9e4a2b2a 100644 --- a/inc/SafeFN.class.php +++ b/inc/SafeFN.class.php @@ -44,7 +44,7 @@ class SafeFN { * * @author Christopher Smith <chris@jalakai.co.uk> */ - public function encode($filename) { + public static function encode($filename) { return self::unicode_to_safe(utf8_to_unicode($filename)); } @@ -73,15 +73,15 @@ class SafeFN { * * @author Christopher Smith <chris@jalakai.co.uk> */ - public function decode($filename) { + public static function decode($filename) { return unicode_to_utf8(self::safe_to_unicode(strtolower($filename))); } - public function validate_printable_utf8($printable_utf8) { + public static function validate_printable_utf8($printable_utf8) { return !preg_match('#[\x01-\x1f]#',$printable_utf8); } - public function validate_safe($safe) { + public static function validate_safe($safe) { return !preg_match('#[^'.self::$plain.self::$post_indicator.self::$pre_indicator.']#',$safe); } @@ -93,7 +93,7 @@ class SafeFN { * * @author Christopher Smith <chris@jalakai.co.uk> */ - private function unicode_to_safe($unicode) { + private static function unicode_to_safe($unicode) { $safe = ''; $converted = false; @@ -126,7 +126,7 @@ class SafeFN { * * @author Christopher Smith <chris@jalakai.co.uk> */ - private function safe_to_unicode($safe) { + private static function safe_to_unicode($safe) { $unicode = array(); $split = preg_split('#(?=['.self::$post_indicator.self::$pre_indicator.'])#',$safe,-1,PREG_SPLIT_NO_EMPTY); |