implementation is unstable
* Add hook for extensions to add user information to the panel in preferences,
next to the user name and ID.
+* (bug 8392) Display protection status of transcluded pages in the edit page
+ template list. Patch by Fyren, with i18n naming tweak.
== Languages updated ==
# Construct the HTML
$outText = '<div class="mw-templatesUsedExplanation">';
- if ($preview)
+ if ( $preview ) {
$outText .= wfMsgExt( 'templatesusedpreview', array( 'parse' ) );
- elseif ($section)
+ } elseif ( $section ) {
$outText .= wfMsgExt( 'templatesusedsection', array( 'parse' ) );
- else
+ } else {
$outText .= wfMsgExt( 'templatesused', array( 'parse' ) );
+ }
$outText .= '</div><ul>';
+
foreach ( $templates as $titleObj ) {
- $outText .= '<li>' . $sk->makeLinkObj( $titleObj ) . '</li>';
+ $r = $titleObj->getRestrictions( 'edit' );
+ if ( in_array( 'sysop', $r ) ) {
+ $protected = wfMsgExt( 'template-protected', array( 'parseinline' ) );
+ } elseif ( in_array( 'autoconfirmed', $r ) ) {
+ $protected = wfMsgExt( 'template-semiprotected', array( 'parseinline' ) );
+ } else {
+ $protected = '';
+ }
+ $outText .= '<li>' . $sk->makeLinkObj( $titleObj ) . ' ' . $protected . '</li>';
}
$outText .= '</ul>';
}
'templatesused' => 'Templates used on this page:',
'templatesusedpreview' => 'Templates used in this preview:',
'templatesusedsection' => 'Templates used in this section:',
+'template-protected' => '(protected)',
+'template-semiprotected' => '(semi-protected)',
'edittools' => '<!-- Text here will be shown below edit and upload forms. -->',
'nocreatetitle' => 'Page creation limited',
'nocreatetext' => 'This site has restricted the ability to create new pages.