);
}
- if ( $includesRestrictedPages || $includesCachedPages ) {
- $out->wrapWikiMsg( "<h2 class=\"mw-specialpages-note-top\">$1</h2>", 'specialpages-note-top' );
- $out->wrapWikiMsg( "<div class=\"mw-specialpages-notes\">\n$1\n</div>", 'specialpages-note' );
+ // add legend
+ $notes = [];
+ if ( $includesRestrictedPages ) {
+ $restricedMsg = $this->msg( 'specialpages-note-restricted' );
+ if ( !$restricedMsg->isDisabled() ) {
+ $notes[] = $restricedMsg->plain();
+ }
+ }
+ if ( $includesCachedPages ) {
+ $cachedMsg = $this->msg( 'specialpages-note-cached' );
+ if ( !$cachedMsg->isDisabled() ) {
+ $notes[] = $cachedMsg->plain();
+ }
+ }
+ if ( $notes !== [] ) {
+ $out->wrapWikiMsg(
+ "<h2 class=\"mw-specialpages-note-top\">$1</h2>", 'specialpages-note-top'
+ );
+ $out->addWikiText(
+ "<div class=\"mw-specialpages-notes\">\n" .
+ implode( "\n", $notes ) .
+ "\n</div>"
+ );
}
}
}