* (bug 16026) 'Revision-info' and 'revision-info-current' both accept wiki
markup now.
* (bug 16529) Fix for search suggestions with some third-party JS libraries
-* Foreign repositories (API or DB) would fail to fetch images and/or description
- pages if the repo wiki had a different canonical name for the File: namespace.
- Added 'fileNamespace' configuration item to $wgForeignFileRepos to override
- the local canonical name 'File' with another string.
* (bug 13342) importScript() generates more consistent URI encoding
var $thumbScriptUrl, $transformVia404;
var $descBaseUrl, $scriptDirUrl, $articleUrl, $fetchDescription, $initialCapital;
var $pathDisclosureProtection = 'paranoid';
- var $descriptionCacheExpiry, $apiThumbCacheExpiry, $hashLevels, $fileNamespace;
+ var $descriptionCacheExpiry, $apiThumbCacheExpiry, $hashLevels;
/**
* Factory functions for creating new files
// Optional settings
$this->initialCapital = true; // by default
- $this->fileNamespace = MWNamespace::getCanonicalName( NS_FILE ); // fallback to 'File'
foreach ( array( 'descBaseUrl', 'scriptDirUrl', 'articleUrl', 'fetchDescription',
'thumbScriptUrl', 'initialCapital', 'pathDisclosureProtection',
- 'descriptionCacheExpiry', 'apiThumbCacheExpiry', 'hashLevels', 'fileNamespace' ) as $var )
+ 'descriptionCacheExpiry', 'apiThumbCacheExpiry', 'hashLevels' ) as $var )
{
if ( isset( $info[$var] ) ) {
$this->$var = $info[$var];
if ( is_null( $this->descBaseUrl ) ) {
if ( !is_null( $this->articleUrl ) ) {
$this->descBaseUrl = str_replace( '$1',
- wfUrlencode( $this->getFileNamespace() ) . ':', $this->articleUrl );
+ wfUrlencode( MWNamespace::getCanonicalName( NS_FILE ) ) . ':', $this->articleUrl );
} elseif ( !is_null( $this->scriptDirUrl ) ) {
$this->descBaseUrl = $this->scriptDirUrl . '/index.php?title=' .
- wfUrlencode( $this->getFileNamespace() ) . ':';
+ wfUrlencode( MWNamespace::getCanonicalName( NS_FILE ) ) . ':';
} else {
$this->descBaseUrl = false;
}
function getDescriptionRenderUrl( $name ) {
if ( isset( $this->scriptDirUrl ) ) {
return $this->scriptDirUrl . '/index.php?title=' .
- wfUrlencode( $this->getFileNamespace() . ':' . $name ) .
+ wfUrlencode( MWNamespace::getCanonicalName( NS_FILE ) . ':' . $name ) .
'&action=render';
} else {
$descBase = $this->getDescBaseUrl();
function findBySha1( $hash ) {
return array();
}
- /**
- * Returns the file namespace string
- * @return string
- */
- function getFileNamespace() {
- return $this->fileNamespace;
- }
}