From b28f0af08bb72f48c0458141587e4ed5870608c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Mon, 13 Jan 2014 11:00:53 +0000 Subject: [PATCH] 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 --- includes/api/ApiQuerySiteinfo.php | 4 ++++ 1 file changed, 4 insertions(+) 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 ); -- 2.20.1