r25379 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25378‎ | r25379 | r25380 >
Date:21:33, 31 August 2007
Author:aaron
Status:old
Tags:
Comment:
*Revert r25375, breaks other messages. I didn't realize how messed up this scheme is. Some messages need to be parsed others need not too. All should be parsed. Any that don't must be changed.
*Make getUserPermissionsErrorsInternal() insert wikitext link arguments (e.g. '[[x|y]]', rather than raw links), that way we won't have escaped HTML.
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -847,7 +847,7 @@
848848 $this->enableClientCache( false );
849849 $this->mRedirect = '';
850850 $this->mBodytext = '';
851 - $this->addHTML( $this->formatPermissionsErrorMessage( $errors ) );
 851+ $this->addWikiText( $this->formatPermissionsErrorMessage( $errors ) );
852852 }
853853
854854 /** @deprecated */
@@ -1009,7 +1009,7 @@
10101010 $this->setPageTitle( wfMsg( 'viewsource' ) );
10111011 $this->setSubtitle( wfMsg( 'viewsourcefor', $skin->makeKnownLinkObj( $wgTitle ) ) );
10121012
1013 - $this->addHTML( $this->formatPermissionsErrorMessage( $reasons ) );
 1013+ $this->addWikiText( $this->formatPermissionsErrorMessage( $reasons ) );
10141014 } else if( $protected ) {
10151015 $this->setPageTitle( wfMsg( 'viewsource' ) );
10161016 $this->setSubtitle( wfMsg( 'viewsourcefor', $skin->makeKnownLinkObj( $wgTitle ) ) );
Index: trunk/phase3/includes/Title.php
@@ -1178,12 +1178,11 @@
11791179 ( !$this->isTalkPage() && !$user->isAllowed( 'createpage' ) ) ) {
11801180 $errors[] = $user->isAnon() ? array ('nocreatetext') : array ('nocreate-loggedin');
11811181 }
1182 - } elseif( $action == 'move' &&
1183 - !( $this->isMovable() && $user->isAllowed( 'move' ) ) ) {
 1182+ } elseif( $action == 'move' && !( $this->isMovable() && $user->isAllowed( 'move' ) ) ) {
11841183 $errors[] = $user->isAnon() ? array ( 'movenologintext' ) : array ('movenotallowed');
1185 - } else if ( !$user->isAllowed( $action ) ) {
 1184+ } else if ( !$user->isAllowed( $action ) ) {
11861185 $return = null;
1187 - $groups = array();
 1186+ $groups = array();
11881187 global $wgGroupPermissions;
11891188 foreach( $wgGroupPermissions as $key => $value ) {
11901189 if( isset( $value[$action] ) && $value[$action] == true ) {
@@ -1191,7 +1190,7 @@
11921191 $groupPage = User::getGroupPage( $key );
11931192 if( $groupPage ) {
11941193 $skin = $user->getSkin();
1195 - $groups[] = $skin->makeLinkObj( $groupPage, $groupName );
 1194+ $groups[] = '[['.$groupPage->getPrefixedText().'|'.$groupName.']]';
11961195 } else {
11971196 $groups[] = $groupName;
11981197 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r25415Merged revisions 25372-25414 via svnmerge from...david21:15, 2 September 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r25375*$groups are links if possible (strings otherwise), so why is this html escaped?aaron20:12, 31 August 2007

Status & tagging log