File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,12 +80,13 @@ protected function getResultText( QueryResult $res, $outputmode ) {
8080 $ id = $ resourceFormatter ->session ();
8181
8282 $ context = \RequestContext::getMain ();
83-
84- // $parser = \MediaWiki\MediaWikiServices::getInstance()->getParser();
85- $ context ->getOutput ()->addJsConfigVars ( [
86- 'wgCategoryCollation ' => $ GLOBALS ['wgCategoryCollation ' ],
87- 'smwgEntityCollation ' => $ GLOBALS ['smwgEntityCollation ' ],
88- ]);
83+
84+ // the following unfortunately does not work with $wgCachePages
85+ // so we append it in the html elements' attribute below
86+ // $context->getOutput()->addJsConfigVars( [
87+ // 'wgCategoryCollation' => $GLOBALS['wgCategoryCollation'],
88+ // 'smwgEntityCollation' => $GLOBALS['smwgEntityCollation'],
89+ // ]);
8990
9091 // Add options
9192 $ data ['version ' ] = '0.2.5 ' ;
@@ -106,6 +107,7 @@ protected function getResultText( QueryResult $res, $outputmode ) {
106107 'class ' => 'srf-datatables ' . ( $ this ->params ['class ' ] ? ' ' . $ this ->params ['class ' ] : '' ),
107108 'data-theme ' => $ this ->params ['theme ' ],
108109 'data-columnstype ' => ( !empty ( $ this ->params ['columnstype ' ] ) ? $ this ->params ['columnstype ' ] : null ),
110+ 'data-collation ' => !empty ( $ GLOBALS ['smwgEntityCollation ' ] ) ? $ GLOBALS ['smwgEntityCollation ' ] : $ GLOBALS ['wgCategoryCollation ' ]
109111 ],
110112 Html::element (
111113 'div ' ,
You can’t perform that action at this time.
0 commit comments