*Revert r25375, breaks other messages. I didn't realize how messed up this scheme...
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 31 Aug 2007 21:33:44 +0000 (21:33 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 31 Aug 2007 21:33:44 +0000 (21:33 +0000)
*Make getUserPermissionsErrorsInternal() insert wikitext link arguments (e.g. '[[x|y]]', rather than raw links), that way we won't have escaped HTML.

includes/OutputPage.php
includes/Title.php

index 834c393..0646715 100644 (file)
@@ -847,7 +847,7 @@ class OutputPage {
                $this->enableClientCache( false );
                $this->mRedirect = '';
                $this->mBodytext = '';
-               $this->addHTML( $this->formatPermissionsErrorMessage( $errors ) );
+               $this->addWikiText( $this->formatPermissionsErrorMessage( $errors ) );
        }
 
        /** @deprecated */
@@ -1009,7 +1009,7 @@ class OutputPage {
                        $this->setPageTitle( wfMsg( 'viewsource' ) );
                        $this->setSubtitle( wfMsg( 'viewsourcefor', $skin->makeKnownLinkObj( $wgTitle ) ) );
 
-                       $this->addHTML( $this->formatPermissionsErrorMessage( $reasons ) );
+                       $this->addWikiText( $this->formatPermissionsErrorMessage( $reasons ) );
                } else if( $protected ) {
                        $this->setPageTitle( wfMsg( 'viewsource' ) );
                        $this->setSubtitle( wfMsg( 'viewsourcefor', $skin->makeKnownLinkObj( $wgTitle ) ) );
index 80f298c..0c6d819 100644 (file)
@@ -1178,12 +1178,11 @@ class Title {
                                ( !$this->isTalkPage() && !$user->isAllowed( 'createpage' ) ) ) {
                                $errors[] = $user->isAnon() ? array ('nocreatetext') : array ('nocreate-loggedin');
                        }
-               } elseif( $action == 'move' &&
-                       !( $this->isMovable() && $user->isAllowed( 'move' ) ) ) {
+               } elseif( $action == 'move' && !( $this->isMovable() && $user->isAllowed( 'move' ) ) ) {
                        $errors[] = $user->isAnon() ? array ( 'movenologintext' ) : array ('movenotallowed');
-                } else if ( !$user->isAllowed( $action ) ) {
+        } else if ( !$user->isAllowed( $action ) ) {
                        $return = null;
-                       $groups = array();
+                   $groups = array();
                        global $wgGroupPermissions;
                        foreach( $wgGroupPermissions as $key => $value ) {
                            if( isset( $value[$action] ) && $value[$action] == true ) {
@@ -1191,7 +1190,7 @@ class Title {
                                $groupPage = User::getGroupPage( $key );
                                if( $groupPage ) {
                                    $skin = $user->getSkin();
-                                   $groups[] = $skin->makeLinkObj( $groupPage, $groupName );
+                                   $groups[] = '[['.$groupPage->getPrefixedText().'|'.$groupName.']]';
                                } else {
                                    $groups[] = $groupName;
                                }