X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fsite%2FSiteSQLStore.php;h=a4116aea0fcdae64697284436ec2febd57705bf0;hb=8eac2feedb7ee093d2c48504e1eb2b8a9dbc8452;hp=e61179b02e1e3f8bed88747a1d134619a2e85cbf;hpb=c8e2b346f717bcd2bbc357a085cf8ad97fb354eb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/site/SiteSQLStore.php b/includes/site/SiteSQLStore.php index e61179b02e..a4116aea0f 100644 --- a/includes/site/SiteSQLStore.php +++ b/includes/site/SiteSQLStore.php @@ -1,9 +1,7 @@ + * @author Daniel Kinzler */ -class SiteSQLStore extends CachingSiteStore { +class SiteSQLStore { /** + * Returns the global SiteStore instance. This is a relict of the first implementation + * of SiteStore, and is kept around for compatibility. + * + * @note This does not return an instance of SiteSQLStore! + * * @since 1.21 - * @deprecated 1.25 Construct a SiteStore instance directly instead. + * @deprecated 1.27 use MediaWikiServices::getSiteStore() or MediaWikiServices::getSiteLookup() + * instead. * - * @param null $sitesTable Unused - * @param BagOStuff|null $cache + * @param null $sitesTable IGNORED + * @param null $cache IGNORED * * @return SiteStore */ @@ -46,13 +50,11 @@ class SiteSQLStore extends CachingSiteStore { ); } - if ( $cache === null ) { - $cache = wfGetCache( wfIsHHVM() ? CACHE_ACCEL : CACHE_ANYTHING ); - } - - $siteStore = new DBSiteStore(); + // NOTE: we silently ignore $cache for now, since some existing callers + // specify it. If we break compatibility with them, we could just as + // well just remove this class. - return new static( $siteStore, $cache ); + return \MediaWiki\MediaWikiServices::getInstance()->getSiteStore(); } }