Merge "Upgrade jQuery to 1.11.1"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 15 May 2014 15:46:56 +0000 (15:46 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 15 May 2014 15:46:56 +0000 (15:46 +0000)
12 files changed:
RELEASE-NOTES-1.24
includes/AutoLoader.php
includes/db/Database.php
includes/filebackend/FSFileBackend.php
includes/filebackend/FileBackend.php
includes/filebackend/SwiftFileBackend.php
includes/filerepo/FileRepo.php
includes/installer/WebInstaller.php
includes/installer/WebInstallerPage.php
includes/media/MediaTransformOutput.php
includes/upload/UploadBase.php
skins/common/config.css

index 03dcf9e..a666610 100644 (file)
@@ -82,6 +82,22 @@ changes to languages because of Bugzilla reports.
 * RevDel_LogList to RevDelLogList
 * RevDel_RevisionItem to RevDelRevisionItem
 * RevDel_RevisionList to RevDelRevisionList
+* WebInstaller_Complete to WebInstallerComplete
+* WebInstaller_Copying to WebInstallerCopying
+* WebInstaller_DBConnect to WebInstallerDBConnect
+* WebInstaller_DBSettings to WebInstallerDBSettings
+* WebInstaller_Document to WebInstallerDocument
+* WebInstaller_ExistingWiki to WebInstallerExistingWiki
+* WebInstaller_Install to WebInstallerInstall
+* WebInstaller_Language to WebInstallerLanguage
+* WebInstaller_Name to WebInstallerName
+* WebInstaller_Options to WebInstallerOptions
+* WebInstaller_Readme to WebInstallerReadme
+* WebInstaller_ReleaseNotes to WebInstallerReleaseNotes
+* WebInstaller_Restart to WebInstallerRestart
+* WebInstaller_Upgrade to WebInstallerUpgrade
+* WebInstaller_UpgradeDoc to WebInstallerUpgradeDoc
+* WebInstaller_Welcome to WebInstallerWelcome
 
 ==== Removed classes ====
 * IPBlockForm - Use SpecialBlock directly
index 6c413c0..515386c 100644 (file)
@@ -622,22 +622,22 @@ $wgAutoloadLocalClasses = array(
        'SqliteInstaller' => 'includes/installer/SqliteInstaller.php',
        'SqliteUpdater' => 'includes/installer/SqliteUpdater.php',
        'WebInstaller' => 'includes/installer/WebInstaller.php',
-       'WebInstaller_Complete' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_Copying' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_DBConnect' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_DBSettings' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_Document' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_ExistingWiki' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_Install' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_Language' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_Name' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_Options' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_Readme' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_ReleaseNotes' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_Restart' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_Upgrade' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_UpgradeDoc' => 'includes/installer/WebInstallerPage.php',
-       'WebInstaller_Welcome' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerComplete' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerCopying' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerDBConnect' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerDBSettings' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerDocument' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerExistingWiki' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerInstall' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerLanguage' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerName' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerOptions' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerReadme' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerReleaseNotes' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerRestart' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerUpgrade' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerUpgradeDoc' => 'includes/installer/WebInstallerPage.php',
+       'WebInstallerWelcome' => 'includes/installer/WebInstallerPage.php',
        'WebInstallerOutput' => 'includes/installer/WebInstallerOutput.php',
        'WebInstallerPage' => 'includes/installer/WebInstallerPage.php',
 
index f7fe980..286f8b0 100644 (file)
@@ -806,7 +806,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType {
         * database. Example uses in core:
         * @see LoadBalancer::reallyOpenConnection()
         * @see ForeignDBRepo::getMasterDB()
-        * @see WebInstaller_DBConnect::execute()
+        * @see WebInstallerDBConnect::execute()
         *
         * @since 1.18
         *
index 2b18443..9586657 100644 (file)
@@ -90,6 +90,10 @@ class FSFileBackend extends FileBackendStore {
                }
        }
 
+       public function getFeatures() {
+               return !wfIsWindows() ? FileBackend::ATTR_UNICODE_PATHS : 0;
+       }
+
        protected function resolveContainerPath( $container, $relStoragePath ) {
                // Check that container has a root directory
                if ( isset( $this->containerPaths[$container] ) || isset( $this->basePath ) ) {
index f99da6d..a9e312d 100644 (file)
@@ -104,9 +104,10 @@ abstract class FileBackend {
        /** @var FileJournal */
        protected $fileJournal;
 
-       /** Flags for supported features */
-       const ATTR_HEADERS = 1;
-       const ATTR_METADATA = 2;
+       /** Bitfield flags for supported features */
+       const ATTR_HEADERS = 1; // files can be tagged with standard HTTP headers
+       const ATTR_METADATA = 2; // files can be stored with metadata key/values
+       const ATTR_UNICODE_PATHS = 4; // files can have Unicode paths (not just ASCII)
 
        /**
         * Create a new backend instance from configuration.
@@ -211,7 +212,7 @@ abstract class FileBackend {
         * @since 1.23
         */
        public function getFeatures() {
-               return 0;
+               return self::ATTR_UNICODE_PATHS;
        }
 
        /**
index 2f4be9e..9249a09 100644 (file)
@@ -146,7 +146,8 @@ class SwiftFileBackend extends FileBackendStore {
        }
 
        public function getFeatures() {
-               return ( FileBackend::ATTR_HEADERS | FileBackend::ATTR_METADATA );
+               return ( FileBackend::ATTR_UNICODE_PATHS |
+                       FileBackend::ATTR_HEADERS | FileBackend::ATTR_METADATA );
        }
 
        protected function resolveContainerPath( $container, $relStoragePath ) {
index 7a30ccc..4c250ba 100644 (file)
@@ -295,6 +295,13 @@ class FileRepo {
                }
        }
 
+       /**
+        * @return bool Whether non-ASCII path characters are allowed
+        */
+       public function backendSupportsUnicodePaths() {
+               return ( $this->getBackend()->getFeatures() & FileBackend::ATTR_UNICODE_PATHS );
+       }
+
        /**
         * Get the backend storage path corresponding to a virtual URL.
         * Use this function wisely.
index 304508c..085404b 100644 (file)
@@ -61,7 +61,7 @@ class WebInstaller extends Installer {
         * To add a new installer page:
         *    * Add it to this WebInstaller::$pageSequence property
         *    * Add a "config-page-<name>" message
-        *    * Add a "WebInstaller_<name>" class
+        *    * Add a "WebInstaller<name>" class
         *
         * @var string[]
         */
@@ -462,7 +462,7 @@ class WebInstaller extends Installer {
         * @return WebInstallerPage
         */
        public function getPageByName( $pageName ) {
-               $pageClass = 'WebInstaller_' . $pageName;
+               $pageClass = 'WebInstaller' . $pageName;
 
                return new $pageClass( $this );
        }
@@ -1157,4 +1157,4 @@ class WebInstaller extends Installer {
                return WebRequest::detectServer();
        }
 
-}
\ No newline at end of file
+}
index e1ee836..06b561b 100644 (file)
@@ -133,7 +133,7 @@ abstract class WebInstallerPage {
         * @return string
         */
        public function getName() {
-               return str_replace( 'WebInstaller_', '', get_class( $this ) );
+               return str_replace( 'WebInstaller', '', get_class( $this ) );
        }
 
        /**
@@ -205,7 +205,7 @@ abstract class WebInstallerPage {
 
 }
 
-class WebInstaller_Language extends WebInstallerPage {
+class WebInstallerLanguage extends WebInstallerPage {
 
        /**
         * @return string|null
@@ -306,7 +306,7 @@ class WebInstaller_Language extends WebInstallerPage {
 
 }
 
-class WebInstaller_ExistingWiki extends WebInstallerPage {
+class WebInstallerExistingWiki extends WebInstallerPage {
 
        /**
         * @return string
@@ -470,7 +470,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage {
 
 }
 
-class WebInstaller_Welcome extends WebInstallerPage {
+class WebInstallerWelcome extends WebInstallerPage {
 
        /**
         * @return string
@@ -499,7 +499,7 @@ class WebInstaller_Welcome extends WebInstallerPage {
 
 }
 
-class WebInstaller_DBConnect extends WebInstallerPage {
+class WebInstallerDBConnect extends WebInstallerPage {
 
        /**
         * @return string|null When string, "skip" or "continue"
@@ -600,7 +600,7 @@ class WebInstaller_DBConnect extends WebInstallerPage {
 
 }
 
-class WebInstaller_Upgrade extends WebInstallerPage {
+class WebInstallerUpgrade extends WebInstallerPage {
 
        /**
         * @return bool Always true.
@@ -691,7 +691,7 @@ class WebInstaller_Upgrade extends WebInstallerPage {
 
 }
 
-class WebInstaller_DBSettings extends WebInstallerPage {
+class WebInstallerDBSettings extends WebInstallerPage {
 
        /**
         * @return string|null
@@ -725,7 +725,7 @@ class WebInstaller_DBSettings extends WebInstallerPage {
 
 }
 
-class WebInstaller_Name extends WebInstallerPage {
+class WebInstallerName extends WebInstallerPage {
 
        /**
         * @return string
@@ -941,7 +941,7 @@ class WebInstaller_Name extends WebInstallerPage {
 
 }
 
-class WebInstaller_Options extends WebInstallerPage {
+class WebInstallerOptions extends WebInstallerPage {
 
        /**
         * @return string|null
@@ -1305,7 +1305,7 @@ class WebInstaller_Options extends WebInstallerPage {
 
 }
 
-class WebInstaller_Install extends WebInstallerPage {
+class WebInstallerInstall extends WebInstallerPage {
 
        /**
         * @return bool Always true.
@@ -1380,7 +1380,7 @@ class WebInstaller_Install extends WebInstallerPage {
 
 }
 
-class WebInstaller_Complete extends WebInstallerPage {
+class WebInstallerComplete extends WebInstallerPage {
 
        public function execute() {
                // Pop up a dialog box, to make it difficult for the user to forget
@@ -1418,7 +1418,7 @@ class WebInstaller_Complete extends WebInstallerPage {
 
 }
 
-class WebInstaller_Restart extends WebInstallerPage {
+class WebInstallerRestart extends WebInstallerPage {
 
        /**
         * @return string|null
@@ -1444,7 +1444,7 @@ class WebInstaller_Restart extends WebInstallerPage {
 
 }
 
-abstract class WebInstaller_Document extends WebInstallerPage {
+abstract class WebInstallerDocument extends WebInstallerPage {
 
        /**
         * @return string
@@ -1473,7 +1473,7 @@ abstract class WebInstaller_Document extends WebInstallerPage {
 
 }
 
-class WebInstaller_Readme extends WebInstaller_Document {
+class WebInstallerReadme extends WebInstallerDocument {
 
        /**
         * @return string
@@ -1484,7 +1484,7 @@ class WebInstaller_Readme extends WebInstaller_Document {
 
 }
 
-class WebInstaller_ReleaseNotes extends WebInstaller_Document {
+class WebInstallerReleaseNotes extends WebInstallerDocument {
 
        /**
         * @throws MWException
@@ -1502,7 +1502,7 @@ class WebInstaller_ReleaseNotes extends WebInstaller_Document {
 
 }
 
-class WebInstaller_UpgradeDoc extends WebInstaller_Document {
+class WebInstallerUpgradeDoc extends WebInstallerDocument {
 
        /**
         * @return string
@@ -1513,7 +1513,7 @@ class WebInstaller_UpgradeDoc extends WebInstaller_Document {
 
 }
 
-class WebInstaller_Copying extends WebInstaller_Document {
+class WebInstallerCopying extends WebInstallerDocument {
 
        /**
         * @return string
index 99eca62..d8d56a4 100644 (file)
@@ -106,6 +106,9 @@ abstract class MediaTransformOutput {
         */
        public function setStoragePath( $storagePath ) {
                $this->storagePath = $storagePath;
+               if ( $this->path === false ) {
+                       $this->path = $storagePath;
+               }
        }
 
        /**
@@ -140,9 +143,12 @@ abstract class MediaTransformOutput {
 
        /**
         * Check if an output thumbnail file actually exists.
+        *
         * This will return false if there was an error, the
         * thumbnail is to be handled client-side only, or if
         * transformation was deferred via TRANSFORM_LATER.
+        * This file may exist as a new file in /tmp, a file
+        * in permanent storage, or even refer to the original.
         *
         * @return bool
         */
index bef80be..b32780f 100644 (file)
@@ -847,8 +847,10 @@ 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;
 
index 2f8e1e2..aedb6a9 100644 (file)
 
 .config-cc-wrapper {
        clear: left;
-       /* If you change this height, also change it in WebInstaller_Options::submitCC() */
+       /* If you change this height, also change it in WebInstallerOptions::submitCC() */
        height: 54em;
 }