Various,
authorAndrew Garrett <werdna@users.mediawiki.org>
Fri, 12 Jan 2007 09:10:30 +0000 (09:10 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Fri, 12 Jan 2007 09:10:30 +0000 (09:10 +0000)
includes/EditPage.php
includes/OutputPage.php
includes/ProtectionForm.php
includes/Title.php
languages/messages/MessagesEn.php

index 7217c04..f24fe92 100644 (file)
@@ -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";
index ba3c44a..e6b872c 100644 (file)
@@ -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";
index 6a75d90..ef993bf 100644 (file)
@@ -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";
index c4947c7..cdcf64e 100644 (file)
@@ -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;
                }
 
index 167ac89..2d52e10 100644 (file)
@@ -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.</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:',
@@ -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 <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',