pmwiki 上傳與使用中文檔名

pmwiki 上傳與使用中文檔名

希望不要在忘記了,每次都要搞很久...

svn diff scripts/upload.php

Index: scripts/upload.php

===================================================================

--- scripts/upload.php (revision 66)

+++ scripts/upload.php (working copy)

@@ -114,11 +114,11 @@

function MakeUploadName(\$pagename,\$x) {

global \$UploadNameChars, \$MakeUploadNamePatterns;

  • SDV(\$UploadNameChars, "-\\w. ");

  • SDV(\$UploadNameChars, "-\\w. \\x80-\\xff");

SDV(\$MakeUploadNamePatterns, array(

"/[\^\$UploadNameChars]/" => '',

'/\\.[\^.]*\$/e' => 'strtolower("\$0")',

  • '/\^[\^[:alnum:]_]+/' => '',

+# '/\^[\^[:alnum:]_]+/' => '',

'/[\^[:alnum:]_]+\$/' => ''));

return preg_replace(array_keys(\$MakeUploadNamePatterns),

array_values(\$MakeUploadNamePatterns), \$x);

convert from Thomas blog post id 764 old convert log: ./171419/tag%3E2010%2009%20linux-pmwiki)

@2010 @09 @linux-pmwiki

Comments