// Page protection
$pageInfo['header-restrictions'] = array();
+ // Is this page effected by the cascading protection of something which includes it?
+ if ( $title->isCascadeProtected() ) {
+ $cascadingFrom = '';
+ $sources = $title->getCascadeProtectionSources(); // Array deferencing is in PHP 5.4 :(
+
+ foreach ( $sources[0] as $sourceTitle ) {
+ $cascadingFrom .= Html::rawElement( 'li', array(), Linker::linkKnown( $sourceTitle ) );
+ }
+
+ $cascadingFrom = Html::rawElement( 'ul', array(), $cascadingFrom );
+ $pageInfo['header-restrictions'][] = array(
+ $this->msg( 'pageinfo-protect-cascading-from' ),
+ $cascadingFrom
+ );
+ }
+
+ // Is out protection set to cascade to other pages?
+ if ( $title->areRestrictionsCascading() ) {
+ $pageInfo['header-restrictions'][] = array(
+ $this->msg( 'pageinfo-protect-cascading' ),
+ $this->msg( 'pageinfo-protect-cascading-yes' )
+ );
+ }
+
// Page protection
foreach ( $title->getRestrictionTypes() as $restrictionType ) {
$protectionLevel = implode( ', ', $title->getRestrictions( $restrictionType ) );
'pageinfo-redirectsto-info' => 'info',
'pageinfo-contentpage' => 'Counted as a content page',
'pageinfo-contentpage-yes' => 'Yes',
+'pageinfo-protect-cascading' => 'Protections are cascading from here',
+'pageinfo-protect-cascading-yes' => 'Yes',
+'pageinfo-protect-cascading-from' => 'Protections are cascading from',
# Skin names
'skinname-standard' => 'Classic', # only translate this message to other languages if you have to change it
'pageinfo-redirectsto-info' => 'Text to put in parentheses for the link to the action=info of the redirect target.',
'pageinfo-contentpage' => 'Key for the row shown if this page is counted as a content page',
'pageinfo-contentpage-yes' => 'Yes, this page is a content page',
+'pageinfo-protect-cascading' => 'Key for the row which shows whether this page has cascading protection enabled',
+'pageinfo-protect-cascading-yes' => 'Yes, protections are cascading from here',
+'pageinfo-protect-cascading-from' => 'Key for a list of pages where protections are cascading from',
# Skin names
'skinname-standard' => '{{optional}}
'pageinfo-redirectsto-info',
'pageinfo-contentpage',
'pageinfo-contentpage-yes',
+ 'pageinfo-protect-cascading',
+ 'pageinfo-protect-cascading-yes',
+ 'pageinfo-protect-cascading-from',
),
'skin' => array(
'skinname-standard',