summaryrefslogtreecommitdiff
path: root/inc/SafeFN.class.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-07-28 12:02:06 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-07-28 12:02:06 +0200
commite8b5a4f91c8a6e230a6cfe13c43dc9ddce31e253 (patch)
tree419623aa4696b6c67b75e3fca3f9eb264828b2be /inc/SafeFN.class.php
parent0d16f6e357991625b4e88fc7a147c8d743e890d7 (diff)
downloadrpg-e8b5a4f91c8a6e230a6cfe13c43dc9ddce31e253.tar.gz
rpg-e8b5a4f91c8a6e230a6cfe13c43dc9ddce31e253.tar.bz2
fix E_STRICT errors FS#2427
This commit fixes all E_STRICT messages shown when running the test suite. There might be more problems not covered by tests, yet. For compatibility reasons with plugins, E_STRICT errors are still supressed.
Diffstat (limited to 'inc/SafeFN.class.php')
-rw-r--r--inc/SafeFN.class.php12
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);