This is needed by MultimediaViewer to show a relevant icon next to the foreign repo link to the description page
Change-Id: Id02743b036a2b88677d76613a73787874f5e448b
Mingle: Multimedia card #107
$data['mainpage'] = $mainPage->getPrefixedText();
$data['base'] = wfExpandUrl( $mainPage->getFullURL(), PROTO_CURRENT );
$data['sitename'] = $GLOBALS['wgSitename'];
$data['mainpage'] = $mainPage->getPrefixedText();
$data['base'] = wfExpandUrl( $mainPage->getFullURL(), PROTO_CURRENT );
$data['sitename'] = $GLOBALS['wgSitename'];
- $data['logo'] = $GLOBALS['wgLogo'];
+
+ // wgLogo can either be a relative or an absolute path
+ // make sure we always return an absolute path
+ $data['logo'] = wfExpandUrl( $GLOBALS['wgLogo'], PROTO_RELATIVE );
+
$data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}";
$data['phpversion'] = phpversion();
$data['phpsapi'] = PHP_SAPI;
$data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}";
$data['phpversion'] = phpversion();
$data['phpsapi'] = PHP_SAPI;
}
if ( !empty( $GLOBALS['wgFavicon'] ) ) {
}
if ( !empty( $GLOBALS['wgFavicon'] ) ) {
- $data['favicon'] = $GLOBALS['wgFavicon'];
+ // wgFavicon can either be a relative or an absolute path
+ // make sure we always return an absolute path
+ $data['favicon'] = wfExpandUrl( $GLOBALS['wgFavicon'], PROTO_RELATIVE );
}
wfRunHooks( 'APIQuerySiteInfoGeneralInfo', array( $this, &$data ) );
}
wfRunHooks( 'APIQuerySiteInfoGeneralInfo', array( $this, &$data ) );
$info['articlepath'] = $general['articlepath'];
$info['server'] = $general['server'];
$info['articlepath'] = $general['articlepath'];
$info['server'] = $general['server'];
+
+ if ( isset( $general['favicon'] ) ) {
+ $info['favicon'] = $general['favicon'];
+ }