if( $this->mTitle->isProtected( 'edit' ) ) {
- $cascadeSources = $this->mTitle->getCascadeProtectionSources( true );
+ $cascadeSources = $this->mTitle->getCascadeProtectionSources( );
# Is the protection due to the namespace, e.g. interface text?
if( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
$titles = '';
foreach ( $cascadeSources as $title ) {
- $titles .= '* ' . $title->getPrefixedText() . "\r\n";
+ $titles .= '* [[:' . $title->getPrefixedText() . "]]\n";
}
$notice = wfMsg( 'cascadeprotectedwarning' ) . "\r\n$titles";
$titles = '';
foreach ( $cascadeSources as $title ) {
- $titles .= '* ' . $title->getPrefixedText() . "\r\n";
+ $titles .= '* [[:' . $title->getPrefixedText() . "]]\n";
}
$notice = wfMsg( 'cascadeprotected' ) . "\r\n$titles";
$titles = '';
foreach ( $cascadeSources as $title ) {
- $titles .= '* ' . $title->getPrefixedText() . "\r\n";
+ $titles .= '* [[:' . $title->getPrefixedText() . "]]\n";
}
$notice = wfMsg( 'protect-cascadeon' ) . "\r\n$titles";
if ( $this->getNamespace() == NS_IMAGE ) {
$cols = $get_pages ? array('pr_page', 'page_namespace', 'page_title') : array( '1' );
- $tables = array ('imagelinks', 'page_restrictions', 'page');
+ $tables = array ('imagelinks', 'page_restrictions');
$where_clauses = array( 'il_to' => $this->getDBkey(), 'il_from=pr_page', 'pr_cascade' => 1 );
} else {
$cols = $get_pages ? array( 'pr_page', 'page_namespace', 'page_title' ) : array( '1' );
- $tables = array ('templatelinks', 'page_restrictions', 'page');
+ $tables = array ('templatelinks', 'page_restrictions');
$where_clauses = array( 'tl_namespace' => $this->getNamespace(), 'tl_title' => $this->getDBkey(), 'tl_from=pr_page', 'pr_cascade' => 1 );
}
if ( $get_pages ) {
$where_clauses[] = 'page_id=pr_page';
+ $tables[] = 'page';
}
#!$get_pages or die( var_dump( array( $cols, $tables, $where_clauses ) ) );
$page_title = $row->page_title;
$sources[$page_id] = Title::makeTitle($page_ns, $page_title);
}
- } else { $sources = true; }
+ } else {
+ $sources = true;
+ }
} else {
$sources = false;
}
if ( $get_pages ) {
$this->mCascadeSources = $sources;
- }
- else {
+ } else {
$this->mHasCascadingRestrictions = $sources;
}
the text into a text file and save it for later.</strong>',
'protectedpagewarning' => "<strong>WARNING: This page has been locked so that only users with sysop privileges can edit it.</strong>",
'semiprotectedpagewarning' => "'''Note:''' This page has been locked so that only registered users can edit it.",
-'cascadeprotectedwarning' => "<strong>WARNING: This page has been locked so that only users with sysop privileges can edit it, because it is included in the following pages, which are protected with the 'cascading protection' option turned on.</strong>:",
+'cascadeprotectedwarning' => "<strong>WARNING: This page has been locked so that only users with sysop privileges can edit it, because it is included in the following pages, which are protected with the \"cascading protection\" option turned on.</strong>:",
'templatesused' => 'Templates used on this page:',
'templatesusedpreview' => 'Templates used in this preview:',
'templatesusedsection' => 'Templates used in this section:',
'protect-text' => 'You may view and change the protection level here for the page <strong>$1</strong>.',
'protect-viewtext' => 'Your account does not have permission to change
page protection levels. Here are the current settings for the page <strong>$1</strong>:',
-'protect-cascadeon' => 'This page is currently subject to cascading protection, because it is included in the following pages, which are protected with the "cascading protection" option turned on. You can change the protection level for this page here, but it will not affect the cascading protection:',
+'protect-cascadeon' => 'This page is currently subject to "cascading protection", because it is included in the following pages, which are protected with the "cascading protection" option turned on. You can change the protection level for this page here, but it will not affect the cascading protection:',
'protect-default' => '(default)',
'protect-level-autoconfirmed' => 'Block unregistered users',
'protect-level-sysop' => 'Sysops only',