Index: includes/Linker.php
===================================================================
--- includes/Linker.php (revision 18663)
+++ includes/Linker.php (working copy)
@@ -1131,15 +1131,25 @@
# Construct the HTML
$outText = '
';
- 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 .= '
';
+
foreach ( $templates as $titleObj ) {
- $outText .= '- ' . $sk->makeLinkObj( $titleObj ) . '
';
+ $r = $titleObj->getRestrictions( 'edit' );
+ if ( in_array( 'sysop', $r ) ) {
+ $protected = wfMsgExt( 'protected', array( 'parseinline' ) );
+ } elseif ( in_array( 'autoconfirmed', $r ) ) {
+ $protected = wfMsgExt( 'semiprotected', array( 'parseinline' ) );
+ } else {
+ $protected = '';
+ }
+ $outText .= '- ' . $sk->makeLinkObj( $titleObj ) . ' ' . $protected . '
';
}
$outText .= '
';
}
Index: languages/messages/MessagesEn.php
===================================================================
@@ -1012,6 +1013,8 @@
'nocreatetitle' => 'Page creation limited',
'nocreatetext' => 'This site has restricted the ability to create new pages.
You can go back and edit an existing page, or [[Special:Userlogin|log in or create an account]].',
+'protected' => '(protected)',
+'semiprotected' => '(semi-protected)',
# "Undo" feature
'undo-success' => 'The edit has been undone. Please confirm, and then save the changes below.',