OSDN Git Service

Modify "cleanFileName" function in globalfunctions.php. Now this script includes...
authorsakamocchi <sakamocchi@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 21 Mar 2011 01:22:25 +0000 (01:22 +0000)
committersakamocchi <sakamocchi@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 21 Mar 2011 01:22:25 +0000 (01:22 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@1168 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/libs/globalfunctions.php

index 19836ec..282522b 100755 (executable)
@@ -2455,23 +2455,12 @@ function selectSpecialSkinType($id) {
  * @return String cleaned filename ready for use\r
  */\r
 function cleanFileName($str) {\r
-       $cleaner = array();\r
-       $cleaner[] = array('expression'=>"/[àáäãâª]/",'replace'=>"a");\r
-       $cleaner[] = array('expression'=>"/[èéêë]/",'replace'=>"e");\r
-       $cleaner[] = array('expression'=>"/[ìíîï]/",'replace'=>"i");\r
-       $cleaner[] = array('expression'=>"/[òóõôö]/",'replace'=>"o");\r
-       $cleaner[] = array('expression'=>"/[ùúûü]/",'replace'=>"u");\r
-       $cleaner[] = array('expression'=>"/[ñ]/",'replace'=>"n");\r
-       $cleaner[] = array('expression'=>"/[ç]/",'replace'=>"c");\r
-       \r
        $str = strtolower($str);\r
        $ext_point = strrpos($str,".");\r
        if ($ext_point===false) return false;\r
        $ext = substr($str,$ext_point,strlen($str));\r
        $str = substr($str,0,$ext_point);\r
-       \r
-       //foreach( $cleaner as $cv ) $str = preg_replace($cv["expression"],$cv["replace"],$str);\r
-       \r
+\r
        return preg_replace("/[^a-z0-9-]/","_",$str).$ext;\r
 }\r
 \r