File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020* extract "RemoveRedlinks" folder into "extension/" folder of Mediawiki installation
2121* add ` wfLoadExtension("RemoveRedlinks"); ` to your LocalSettings.php
22- * Disable parser cache in LocalSettings.php by ` $wgParserCacheType = CACHE_NONE; `
23-
Original file line number Diff line number Diff line change 1616 "config" : {
1717 },
1818 "Hooks" : {
19- "HtmlPageLinkRendererBegin" : " MediaWiki\\ Extension\\ RemoveRedlinks\\ Hooks::onHtmlPageLinkRendererBegin"
19+ "HtmlPageLinkRendererBegin" : " MediaWiki\\ Extension\\ RemoveRedlinks\\ Hooks::onHtmlPageLinkRendererBegin" ,
20+ "PageRenderingHash" : " MediaWiki\\ Extension\\ RemoveRedlinks\\ Hooks::onPageRenderingHash"
2021 },
2122 "MessagesDirs" : {
2223 "RemoveRedlinks" : [
Original file line number Diff line number Diff line change @@ -49,5 +49,19 @@ public static function onHtmlPageLinkRendererBegin(
4949 return false ;
5050 };
5151 }
52+
53+ public static function onPageRenderingHash (
54+ &$ confstr ,
55+ \User $ user ,
56+ &$ forOptions ) {
57+
58+ if ( $ user ->isLoggedIn ()) {
59+ $ confstr .= "!userKnown " ;
60+ }
61+ else {
62+ $ confstr .= "!userUnknown " ;
63+ }
64+ return true ;
65+ }
5266}
5367?>
You can’t perform that action at this time.
0 commit comments