X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fsite%2FSiteSQLStore.php;h=2f8a113ca4cf62cece66e19e8e18b151d02f4cc5;hb=1cdd4682ed43ffe4d95597e54836189ca974404b;hp=e61179b02e1e3f8bed88747a1d134619a2e85cbf;hpb=cb2896f90ebef77c02c9da4067b0e56e37471092;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/site/SiteSQLStore.php b/includes/site/SiteSQLStore.php index e61179b02e..2f8a113ca4 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 since 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(); } }