Merge "Revert "mediawiki.widgets: Add temporary workaround for upstream oojs-ui bug""
[lhc/web/wiklou.git] / includes / site / SiteSQLStore.php
index d77f07b..e61179b 100644 (file)
@@ -34,14 +34,20 @@ class SiteSQLStore extends CachingSiteStore {
         * @since 1.21
         * @deprecated 1.25 Construct a SiteStore instance directly instead.
         *
-        * @param ORMTable|null $sitesTable
+        * @param null $sitesTable Unused
         * @param BagOStuff|null $cache
         *
         * @return SiteStore
         */
-       public static function newInstance( ORMTable $sitesTable = null, BagOStuff $cache = null ) {
+       public static function newInstance( $sitesTable = null, BagOStuff $cache = null ) {
+               if ( $sitesTable !== null ) {
+                       throw new InvalidArgumentException(
+                               __METHOD__ . ': $sitesTable parameter is unused and must be null'
+                       );
+               }
+
                if ( $cache === null ) {
-                       $cache = wfGetMainCache();
+                       $cache = wfGetCache( wfIsHHVM() ? CACHE_ACCEL : CACHE_ANYTHING );
                }
 
                $siteStore = new DBSiteStore();