From a355a684c1a2c166611c8a1cedecb2957457a1b9 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Fri, 12 Jan 2007 09:10:30 +0000 Subject: [PATCH] Various, --- includes/EditPage.php | 4 ++-- includes/OutputPage.php | 2 +- includes/ProtectionForm.php | 2 +- includes/Title.php | 12 +++++++----- languages/messages/MessagesEn.php | 4 ++-- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 7217c04ad9..f24fe92684 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -964,7 +964,7 @@ class EditPage { 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 ) { @@ -981,7 +981,7 @@ class EditPage { $titles = ''; foreach ( $cascadeSources as $title ) { - $titles .= '* ' . $title->getPrefixedText() . "\r\n"; + $titles .= '* [[:' . $title->getPrefixedText() . "]]\n"; } $notice = wfMsg( 'cascadeprotectedwarning' ) . "\r\n$titles"; diff --git a/includes/OutputPage.php b/includes/OutputPage.php index ba3c44acad..e6b872c4c0 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -903,7 +903,7 @@ class OutputPage { $titles = ''; foreach ( $cascadeSources as $title ) { - $titles .= '* ' . $title->getPrefixedText() . "\r\n"; + $titles .= '* [[:' . $title->getPrefixedText() . "]]\n"; } $notice = wfMsg( 'cascadeprotected' ) . "\r\n$titles"; diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 6a75d90cda..ef993bf0e4 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -79,7 +79,7 @@ class ProtectionForm { $titles = ''; foreach ( $cascadeSources as $title ) { - $titles .= '* ' . $title->getPrefixedText() . "\r\n"; + $titles .= '* [[:' . $title->getPrefixedText() . "]]\n"; } $notice = wfMsg( 'protect-cascadeon' ) . "\r\n$titles"; diff --git a/includes/Title.php b/includes/Title.php index c4947c74af..cdcf64e02a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1364,16 +1364,17 @@ class Title { 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 ) ) ); @@ -1389,7 +1390,9 @@ class Title { $page_title = $row->page_title; $sources[$page_id] = Title::makeTitle($page_ns, $page_title); } - } else { $sources = true; } + } else { + $sources = true; + } } else { $sources = false; } @@ -1398,8 +1401,7 @@ class Title { if ( $get_pages ) { $this->mCascadeSources = $sources; - } - else { + } else { $this->mHasCascadingRestrictions = $sources; } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 167ac8945c..2d52e10420 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1015,7 +1015,7 @@ so you will not be able to save your edits right now. You may wish to cut-n-past the text into a text file and save it for later.', 'protectedpagewarning' => "WARNING: This page has been locked so that only users with sysop privileges can edit it.", 'semiprotectedpagewarning' => "'''Note:''' This page has been locked so that only registered users can edit it.", -'cascadeprotectedwarning' => "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.:", +'cascadeprotectedwarning' => "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.:", 'templatesused' => 'Templates used on this page:', 'templatesusedpreview' => 'Templates used in this preview:', 'templatesusedsection' => 'Templates used in this section:', @@ -1745,7 +1745,7 @@ Please hit "back" and reload the page you came from, then try again.', 'protect-text' => 'You may view and change the protection level here for the page $1.', 'protect-viewtext' => 'Your account does not have permission to change page protection levels. Here are the current settings for the page $1:', -'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', -- 2.20.1