Merge "Added unicode encoding support flags to FileBackend"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 15 May 2014 15:06:19 +0000 (15:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 15 May 2014 15:06:19 +0000 (15:06 +0000)
1  2 
includes/upload/UploadBase.php

@@@ -847,11 -799,12 +847,13 @@@ abstract class UploadBase 
                        return $this->mTitle;
                }
  
-               // Windows may be broken with special characters, see bug XXX
-               if ( wfIsWindows() && !preg_match( '/^[\x0-\x7f]*$/', $nt->getText() ) ) {
+               // Windows may be broken with special characters, see bug 1780
+               if ( !preg_match( '/^[\x0-\x7f]*$/', $nt->getText() )
+                       && !RepoGroup::singleton()->getLocalRepo()->backendSupportsUnicodePaths()
+               ) {
                        $this->mTitleError = self::WINDOWS_NONASCII_FILENAME;
                        $this->mTitle = null;
 +
                        return $this->mTitle;
                }