* 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
'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',
* database. Example uses in core:
* @see LoadBalancer::reallyOpenConnection()
* @see ForeignDBRepo::getMasterDB()
- * @see WebInstaller_DBConnect::execute()
+ * @see WebInstallerDBConnect::execute()
*
* @since 1.18
*
}
}
+ 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 ) ) {
/** @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.
* @since 1.23
*/
public function getFeatures() {
- return 0;
+ return self::ATTR_UNICODE_PATHS;
}
/**
}
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 ) {
}
}
+ /**
+ * @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.
* 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[]
*/
* @return WebInstallerPage
*/
public function getPageByName( $pageName ) {
- $pageClass = 'WebInstaller_' . $pageName;
+ $pageClass = 'WebInstaller' . $pageName;
return new $pageClass( $this );
}
return WebRequest::detectServer();
}
-}
\ No newline at end of file
+}
* @return string
*/
public function getName() {
- return str_replace( 'WebInstaller_', '', get_class( $this ) );
+ return str_replace( 'WebInstaller', '', get_class( $this ) );
}
/**
}
-class WebInstaller_Language extends WebInstallerPage {
+class WebInstallerLanguage extends WebInstallerPage {
/**
* @return string|null
}
-class WebInstaller_ExistingWiki extends WebInstallerPage {
+class WebInstallerExistingWiki extends WebInstallerPage {
/**
* @return string
}
-class WebInstaller_Welcome extends WebInstallerPage {
+class WebInstallerWelcome extends WebInstallerPage {
/**
* @return string
}
-class WebInstaller_DBConnect extends WebInstallerPage {
+class WebInstallerDBConnect extends WebInstallerPage {
/**
* @return string|null When string, "skip" or "continue"
}
-class WebInstaller_Upgrade extends WebInstallerPage {
+class WebInstallerUpgrade extends WebInstallerPage {
/**
* @return bool Always true.
}
-class WebInstaller_DBSettings extends WebInstallerPage {
+class WebInstallerDBSettings extends WebInstallerPage {
/**
* @return string|null
}
-class WebInstaller_Name extends WebInstallerPage {
+class WebInstallerName extends WebInstallerPage {
/**
* @return string
}
-class WebInstaller_Options extends WebInstallerPage {
+class WebInstallerOptions extends WebInstallerPage {
/**
* @return string|null
}
-class WebInstaller_Install extends WebInstallerPage {
+class WebInstallerInstall extends WebInstallerPage {
/**
* @return bool Always true.
}
-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
}
-class WebInstaller_Restart extends WebInstallerPage {
+class WebInstallerRestart extends WebInstallerPage {
/**
* @return string|null
}
-abstract class WebInstaller_Document extends WebInstallerPage {
+abstract class WebInstallerDocument extends WebInstallerPage {
/**
* @return string
}
-class WebInstaller_Readme extends WebInstaller_Document {
+class WebInstallerReadme extends WebInstallerDocument {
/**
* @return string
}
-class WebInstaller_ReleaseNotes extends WebInstaller_Document {
+class WebInstallerReleaseNotes extends WebInstallerDocument {
/**
* @throws MWException
}
-class WebInstaller_UpgradeDoc extends WebInstaller_Document {
+class WebInstallerUpgradeDoc extends WebInstallerDocument {
/**
* @return string
}
-class WebInstaller_Copying extends WebInstaller_Document {
+class WebInstallerCopying extends WebInstallerDocument {
/**
* @return string
*/
public function setStoragePath( $storagePath ) {
$this->storagePath = $storagePath;
+ if ( $this->path === false ) {
+ $this->path = $storagePath;
+ }
}
/**
/**
* 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
*/
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;
.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;
}