Pass $key into CommentStore methods and use MediawikiServices
[lhc/web/wiklou.git] / includes / ServiceWiring.php
index 847c1bb..dc397a2 100644 (file)
@@ -521,6 +521,14 @@ return [
                return new \MediaWiki\Http\HttpRequestFactory();
        },
 
+       'CommentStore' => function ( MediaWikiServices $services ) {
+               global $wgContLang;
+               return new CommentStore(
+                       $wgContLang,
+                       $services->getMainConfig()->get( 'CommentTableSchemaMigrationStage' )
+               );
+       }
+
        ///////////////////////////////////////////////////////////////////////////
        // NOTE: When adding a service here, don't forget to add a getter function
        // in the MediaWikiServices class. The convenience getter should just call