),
"poweredby" => array(
"mediawiki" => array(
- "src" => null, // Defaults to "$wgScriptPath/resources/assets/poweredby_mediawiki_88x31.png"
+ "src" => null, // Defaults to "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png"
"url" => "//www.mediawiki.org/",
"alt" => "Powered by MediaWiki",
)
if ( $wgExtensionAssetsPath === false ) {
$wgExtensionAssetsPath = "$wgScriptPath/extensions";
}
+if ( $wgResourceBasePath === null ) {
+ $wgResourceBasePath = $wgScriptPath;
+}
if ( $wgLogo === false ) {
$wgLogo = "$wgStylePath/common/images/wiki.png";
if ( $wgRightsIcon ) {
$wgRightsIcon = str_replace(
"{$wgStylePath}/common/images/",
- "{$wgScriptPath}/resources/assets/licenses/",
+ "{$wgResourceBasePath}/resources/assets/licenses/",
$wgRightsIcon
);
}
&& $wgFooterIcons['poweredby']['mediawiki']['src'] === null
) {
$wgFooterIcons['poweredby']['mediawiki']['src'] =
- "$wgScriptPath/resources/assets/poweredby_mediawiki_88x31.png";
+ "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png";
}
/**
* @return ThumbnailImage
*/
function iconThumb() {
- global $wgScriptPath, $IP;
- $assetsPath = "$wgScriptPath/resources/assets/file-type-icons/";
+ global $wgResourceBasePath, $IP;
+ $assetsPath = "$wgResourceBasePath/resources/assets/file-type-icons/";
$assetsDirectory = "$IP/resources/assets/file-type-icons/";
$try = array( 'fileicon-' . $this->getExtension() . '.png', 'fileicon.png' );
public $licenses = array(
'cc-by' => array(
'url' => 'http://creativecommons.org/licenses/by/3.0/',
- 'icon' => '{$wgScriptPath}/resources/assets/licenses/cc-by.png',
+ 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-by.png',
),
'cc-by-sa' => array(
'url' => 'http://creativecommons.org/licenses/by-sa/3.0/',
- 'icon' => '{$wgScriptPath}/resources/assets/licenses/cc-by-sa.png',
+ 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-by-sa.png',
),
'cc-by-nc-sa' => array(
'url' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/',
- 'icon' => '{$wgScriptPath}/resources/assets/licenses/cc-by-nc-sa.png',
+ 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-by-nc-sa.png',
),
'cc-0' => array(
'url' => 'https://creativecommons.org/publicdomain/zero/1.0/',
- 'icon' => '{$wgScriptPath}/resources/assets/licenses/cc-0.png',
+ 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-0.png',
),
'pd' => array(
'url' => '',
- 'icon' => '{$wgScriptPath}/resources/assets/licenses/public-domain.png',
+ 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/public-domain.png',
),
'gfdl' => array(
'url' => 'http://www.gnu.org/copyleft/fdl.html',
- 'icon' => '{$wgScriptPath}/resources/assets/licenses/gnu-fdl.png',
+ 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/gnu-fdl.png',
),
'none' => array(
'url' => '',
* @param string $localBasePath Base path to prepend to all local paths in $options. Defaults
* to $IP
* @param string $remoteBasePath Base path to prepend to all remote paths in $options. Defaults
- * to $wgScriptPath
+ * to $wgResourceBasePath
*
* Below is a description for the $options array:
* @throws MWException
* array(
* // Base path to prepend to all local paths in $options. Defaults to $IP
* 'localBasePath' => [base path],
- * // Base path to prepend to all remote paths in $options. Defaults to $wgScriptPath
+ * // Base path to prepend to all remote paths in $options. Defaults to $wgResourceBasePath
* 'remoteBasePath' => [base path],
* // Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath
* 'remoteExtPath' => [base path],
* @param string $localBasePath Path to use if not provided in module definition. Defaults
* to $IP
* @param string $remoteBasePath Path to use if not provided in module definition. Defaults
- * to $wgScriptPath
+ * to $wgResourceBasePath
* @return array Array( localBasePath, remoteBasePath )
*/
public static function extractBasePaths(
$localBasePath = null,
$remoteBasePath = null
) {
- global $IP, $wgScriptPath, $wgResourceBasePath;
+ global $IP, $wgResourceBasePath;
// The different ways these checks are done, and their ordering, look very silly,
// but were preserved for backwards-compatibility just in case. Tread lightly.
$localBasePath = $localBasePath === null ? $IP : $localBasePath;
if ( $remoteBasePath === null ) {
- $remoteBasePath = $wgResourceBasePath === null ? $wgScriptPath : $wgResourceBasePath;
+ $remoteBasePath = $wgResourceBasePath;
}
if ( isset( $options['remoteExtPath'] ) ) {
* @return string
*/
function getPoweredBy() {
- global $wgScriptPath;
+ global $wgResourceBasePath;
- $url = htmlspecialchars( "$wgScriptPath/resources/assets/poweredby_mediawiki_88x31.png" );
+ $url = htmlspecialchars( "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png" );
$text = '<a href="//www.mediawiki.org/"><img src="' . $url
. '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
wfRunHooks( 'SkinGetPoweredBy', array( &$text, $this ) );