From: Gergő Tisza Date: Mon, 13 Jan 2014 11:00:53 +0000 (+0000) Subject: Add $wgFavicon to siteinfo API X-Git-Tag: 1.31.0-rc.0~17269 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/puce%24spip_lang_rtl.gif?a=commitdiff_plain;h=b28f0af08bb72f48c0458141587e4ed5870608c5;p=lhc%2Fweb%2Fwiklou.git Add $wgFavicon to siteinfo API This would be used by MultimediaViewer to show an icon next to the link to the description page (and probably makes sense to include $wgFavicon if $wgLogo is there, anyway). Bug: 59925 Change-Id: Ibdad9c3d2b515fbfdcd458db9b061f4d4d375180 --- diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 0a74d98bb2..dc76a2d2ff 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -253,6 +253,10 @@ class ApiQuerySiteinfo extends ApiQueryBase { $data['imagelimits'][$k] = array( 'width' => $limit[0], 'height' => $limit[1] ); } + if ( !empty( $GLOBALS['wgFavicon'] ) ) { + $data['favicon'] = $GLOBALS['wgFavicon']; + } + wfRunHooks( 'APIQuerySiteInfoGeneralInfo', array( $this, &$data ) ); return $this->getResult()->addValue( 'query', $property, $data );