http://www.mediawiki.org/wiki/Special:Code/MediaWiki/76206
Revision: 76206 Author: demon Date: 2010-11-06 18:51:45 +0000 (Sat, 06 Nov 2010) Log Message: ----------- Drop silly m prefix from variable Modified Paths: -------------- trunk/extensions/CodeReview/backend/CodeCommentLinker.php trunk/extensions/CodeReview/ui/CodeCommentsListView.php trunk/extensions/CodeReview/ui/CodeRepoStatsView.php trunk/extensions/CodeReview/ui/CodeRevisionAuthorLink.php trunk/extensions/CodeReview/ui/CodeRevisionAuthorView.php trunk/extensions/CodeReview/ui/CodeRevisionListView.php trunk/extensions/CodeReview/ui/CodeRevisionView.php trunk/extensions/CodeReview/ui/CodeStatusChangeListView.php trunk/extensions/CodeReview/ui/CodeStatusListView.php trunk/extensions/CodeReview/ui/SpecialCode.php Modified: trunk/extensions/CodeReview/backend/CodeCommentLinker.php =================================================================== --- trunk/extensions/CodeReview/backend/CodeCommentLinker.php 2010-11-06 18:28:08 UTC (rev 76205) +++ trunk/extensions/CodeReview/backend/CodeCommentLinker.php 2010-11-06 18:51:45 UTC (rev 76206) @@ -4,7 +4,7 @@ function __construct( $repo ) { global $wgUser; - $this->mSkin = $wgUser->getSkin(); + $this->skin = $wgUser->getSkin(); $this->mRepo = $repo; } @@ -54,11 +54,11 @@ class CodeCommentLinkerHtml extends CodeCommentLinker { function makeExternalLink( $url, $text ) { - return $this->mSkin->makeExternalLink( $url, $text ); + return $this->skin->makeExternalLink( $url, $text ); } function makeInternalLink( $title, $text ) { - return $this->mSkin->link( $title, $text ); + return $this->skin->link( $title, $text ); } } Modified: trunk/extensions/CodeReview/ui/CodeCommentsListView.php =================================================================== --- trunk/extensions/CodeReview/ui/CodeCommentsListView.php 2010-11-06 18:28:08 UTC (rev 76205) +++ trunk/extensions/CodeReview/ui/CodeCommentsListView.php 2010-11-06 18:51:45 UTC (rev 76206) @@ -66,16 +66,16 @@ global $wgLang; switch( $name ) { case 'cc_rev_id': - return $this->mView->mSkin->link( + return $this->mView->skin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $value . '#code-comments' ), htmlspecialchars( $value ) ); case 'cr_status': - return $this->mView->mSkin->link( + return $this->mView->skin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/status/' . $value ), htmlspecialchars( $this->mView->statusDesc( $value ) ) ); case 'cc_user_text': - return $this->mView->mSkin->userLink( - 1, $value ); + return $this->mView->skin->userLink( - 1, $value ); case 'cr_message': return $this->mView->messageFragment( $value ); case 'cc_text': Modified: trunk/extensions/CodeReview/ui/CodeRepoStatsView.php =================================================================== --- trunk/extensions/CodeReview/ui/CodeRepoStatsView.php 2010-11-06 18:28:08 UTC (rev 76205) +++ trunk/extensions/CodeReview/ui/CodeRepoStatsView.php 2010-11-06 18:51:45 UTC (rev 76206) @@ -31,7 +31,7 @@ foreach ( CodeRevision::getPossibleStates() as $state ) { $count = isset( $stats->states[$state] ) ? $stats->states[$state] : 0; $count = htmlspecialchars( $wgLang->formatNum( $count ) ); - $link = $this->mSkin->link( + $link = $this->skin->link( SpecialPage::getTitleFor( 'Code', $repoName . '/status/' . $state ), htmlspecialchars( $this->statusDesc( $state ) ) ); @@ -48,7 +48,7 @@ . wfMsgHtml( 'code-stats-count' ) . '</th></tr>' ); foreach ( $stats->fixmes as $user => $count ) { $count = htmlspecialchars( $wgLang->formatNum( $count ) ); - $link = $this->mSkin->link( + $link = $this->skin->link( SpecialPage::getTitleFor( 'Code', $repoName . '/author/' . $user ), htmlspecialchars( $user ) ); Modified: trunk/extensions/CodeReview/ui/CodeRevisionAuthorLink.php =================================================================== --- trunk/extensions/CodeReview/ui/CodeRevisionAuthorLink.php 2010-11-06 18:28:08 UTC (rev 76205) +++ trunk/extensions/CodeReview/ui/CodeRevisionAuthorLink.php 2010-11-06 18:51:45 UTC (rev 76206) @@ -74,7 +74,7 @@ return; } $this->mRepo->linkUser( $this->mAuthor, $user ); - $userlink = $this->mSkin->userLink( $user->getId(), $user->getName() ); + $userlink = $this->skin->userLink( $user->getId(), $user->getName() ); $wgOut->addHTML( '<div class="successbox">' . wfMsgHtml( 'code-author-success', $this->authorLink( $this->mAuthor ), $userlink ) . Modified: trunk/extensions/CodeReview/ui/CodeRevisionAuthorView.php =================================================================== --- trunk/extensions/CodeReview/ui/CodeRevisionAuthorView.php 2010-11-06 18:28:08 UTC (rev 76205) +++ trunk/extensions/CodeReview/ui/CodeRevisionAuthorView.php 2010-11-06 18:51:45 UTC (rev 76206) @@ -17,8 +17,8 @@ return wfMsg( 'code-author-orphan' ); return wfMsgHtml( 'code-author-haslink', - $this->mSkin->userLink( $this->mUser->getId(), $this->mUser->getName() ) . - $this->mSkin->userToolLinks( $this->mUser->getId(), $this->mUser->getName() ) ); + $this->skin->userLink( $this->mUser->getId(), $this->mUser->getName() ) . + $this->skin->userToolLinks( $this->mUser->getId(), $this->mUser->getName() ) ); } function execute() { @@ -29,7 +29,7 @@ if ( $wgUser->isAllowed( 'codereview-link-user' ) ) { $repo = $this->mRepo->getName(); $page = SpecialPage::getTitleFor( 'Code', "$repo/author/$this->mAuthor/link" ); - $linkInfo .= ' (' . $this->mSkin->link( $page, + $linkInfo .= ' (' . $this->skin->link( $page, wfMsg( 'code-author-' . ( $this->mUser ? 'un':'' ) . 'link' ) ) . ')' ; } Modified: trunk/extensions/CodeReview/ui/CodeRevisionListView.php =================================================================== --- trunk/extensions/CodeReview/ui/CodeRevisionListView.php 2010-11-06 18:28:08 UTC (rev 76205) +++ trunk/extensions/CodeReview/ui/CodeRevisionListView.php 2010-11-06 18:51:45 UTC (rev 76206) @@ -307,14 +307,14 @@ return Xml::check( "wpRevisionSelected[]", false, array( 'value' => $row->$sort ) ); case 'cp_rev_id': case 'cr_id': - return $this->mView->mSkin->link( + return $this->mView->skin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $value ), htmlspecialchars( $value ), array(), array( 'path' => $this->mView->mPath ) ); case 'cr_status': - return $this->mView->mSkin->link( + return $this->mView->skin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/status/' . $value ), htmlspecialchars( $this->mView->statusDesc( $value ) ), array(), @@ -330,13 +330,13 @@ if ( $value ) { $special = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $row-> { $this->getDefaultSort() } ); $special->setFragment( '#code-comments' ); - return $this->mView->mSkin->link( $special, htmlspecialchars( $value ) ); + return $this->mView->skin->link( $special, htmlspecialchars( $value ) ); } else { return '-'; } case 'cr_path': return Xml::openElement( 'div', array( 'title' => (string)$value ) ) . - $this->mView->mSkin->link( + $this->mView->skin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/path' ), $wgLang->truncate( (string)$value, 50 ), array( 'title' => (string)$value ), Modified: trunk/extensions/CodeReview/ui/CodeRevisionView.php =================================================================== --- trunk/extensions/CodeReview/ui/CodeRevisionView.php 2010-11-06 18:28:08 UTC (rev 76205) +++ trunk/extensions/CodeReview/ui/CodeRevisionView.php 2010-11-06 18:51:45 UTC (rev 76206) @@ -62,7 +62,7 @@ $wgOut->setPageTitle( wfMsgHtml( 'code-rev-title', $pageTitle ) ); $wgOut->setHTMLTitle( wfMsgHtml( 'code-rev-title', $htmlTitle ) ); - $repoLink = $this->mSkin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ), + $repoLink = $this->skin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ), htmlspecialchars( $this->mRepo->getName() ) ); $revText = $this->navigationLinks(); $paths = ''; @@ -107,7 +107,7 @@ $diffHtml = $this->formatDiff(); $html .= "<h2>" . wfMsgHtml( 'code-rev-diff' ) . - ' <small>[' . $this->mSkin->makeLinkObj( $special, + ' <small>[' . $this->skin->makeLinkObj( $special, wfMsg( 'code-rev-purge-link' ), 'action=purge' ) . ']</small></h2>' . "<div class='mw-codereview-diff' id='mw-codereview-diff'>" . $diffHtml . "</div>\n"; $html .= $this->formatImgDiff(); @@ -165,7 +165,7 @@ if ( $prev ) { $prevTarget = SpecialPage::getTitleFor( 'Code', "$repo/$prev" ); - $links[] = '< ' . $this->mSkin->link( $prevTarget, $this->mRev->getIdString( $prev ), + $links[] = '< ' . $this->skin->link( $prevTarget, $this->mRev->getIdString( $prev ), array(), array( 'path' => $this->mPath ) ); } @@ -180,7 +180,7 @@ if ( $next ) { $nextTarget = SpecialPage::getTitleFor( 'Code', "$repo/$next" ); - $links[] = $this->mSkin->link( $nextTarget, $this->mRev->getIdString( $next ), + $links[] = $this->skin->link( $nextTarget, $this->mRev->getIdString( $next ), array(), array( 'path' => $this->mPath ) ) . ' >'; } @@ -226,7 +226,7 @@ $rev = $this->mRev->getId(); $prev = $rev - 1; if ( $action !== 'D' ) { - $link = $this->mSkin->makeExternalLink( + $link = $this->skin->makeExternalLink( "$viewvc$safePath?view=markup&pathrev=$rev", $path . $from ); } else { @@ -234,7 +234,7 @@ } if ( $action !== 'A' && $action !== 'D' ) { $diff = ' (' . - $this->mSkin->makeExternalLink( + $this->skin->makeExternalLink( "$viewvc$safePath?&pathrev=$rev&r1=$prev&r2=$rev", wfMsg( 'code-rev-diff-link' ) ) . ')'; @@ -315,7 +315,7 @@ protected function formatTag( $tag ) { $repo = $this->mRepo->getName(); $special = SpecialPage::getTitleFor( 'Code', "$repo/tag/$tag" ); - return $this->mSkin->link( $special, htmlspecialchars( $tag ) ); + return $this->skin->link( $special, htmlspecialchars( $tag ) ); } protected function formatDiff() { @@ -487,8 +487,8 @@ global $wgLang; $revId = $change->rev->getIdString(); $line = $wgLang->timeanddate( $change->timestamp, true ); - $line .= ' ' . $this->mSkin->userLink( $change->user, $change->userText ); - $line .= $this->mSkin->userToolLinks( $change->user, $change->userText ); + $line .= ' ' . $this->skin->userLink( $change->user, $change->userText ); + $line .= $this->skin->userToolLinks( $change->user, $change->userText ); // Uses messages 'code-change-status', 'code-change-tags' $line .= ' ' . wfMsgExt( "code-change-{$change->attrib}", 'parseinline', $revId ); $line .= " <i>["; @@ -528,7 +528,7 @@ $css = 'mw-codereview-status-' . htmlspecialchars( $row->cr_status ); $date = $wgLang->timeanddate( $row->cr_timestamp, true ); $title = SpecialPage::getTitleFor( 'Code', "$repo/$rev" ); - $revLink = $this->mSkin->link( $title, $this->mRev->getIdString( $rev ) ); + $revLink = $this->skin->link( $title, $this->mRev->getIdString( $rev ) ); $summary = $this->messageFragment( $row->cr_message ); $author = $this->authorLink( $row->cr_author ); return "<tr class='$css'><td>$revLink</td><td>$summary</td><td>$author</td><td>$date</td></tr>"; @@ -563,7 +563,7 @@ $permaLink = '<strong>' . wfMsgHtml( 'code-rev-inline-preview' ) . '</strong> '; } else { $linkId = 'c' . intval( $comment->id ); - $permaLink = $this->mSkin->link( $this->commentLink( $comment->id ), "#" ); + $permaLink = $this->skin->link( $this->commentLink( $comment->id ), "#" ); } return Xml::openElement( 'div', @@ -574,8 +574,8 @@ '<div class="mw-codereview-comment-meta">' . $permaLink . wfMsgHtml( 'code-rev-comment-by', - $this->mSkin->userLink( $comment->user, $comment->userText ) . - $this->mSkin->userToolLinks( $comment->user, $comment->userText ) ) . + $this->skin->userLink( $comment->user, $comment->userText ) . + $this->skin->userToolLinks( $comment->user, $comment->userText ) ) . '   ' . $wgLang->timeanddate( $comment->timestamp, true ) . ' ' . @@ -600,7 +600,7 @@ $rev = $this->mRev->getId(); $self = SpecialPage::getTitleFor( 'Code', "$repo/$rev/reply/$id" ); $self->setFragment( "#c$id" ); - return '[' . $this->mSkin->link( $self, wfMsg( 'codereview-reply-link' ) ) . ']'; + return '[' . $this->skin->link( $self, wfMsg( 'codereview-reply-link' ) ) . ']'; } protected function postCommentForm( $parent = null ) { Modified: trunk/extensions/CodeReview/ui/CodeStatusChangeListView.php =================================================================== --- trunk/extensions/CodeReview/ui/CodeStatusChangeListView.php 2010-11-06 18:28:08 UTC (rev 76205) +++ trunk/extensions/CodeReview/ui/CodeStatusChangeListView.php 2010-11-06 18:51:45 UTC (rev 76206) @@ -64,18 +64,18 @@ function formatValue( $name, $value ) { switch( $name ) { case 'cpc_rev_id': - return $this->mView->mSkin->link( + return $this->mView->skin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $value . '#code-changes' ), htmlspecialchars( $value ) ); case 'cr_message': return $this->mView->messageFragment( $value ); case 'cr_status': - return $this->mView->mSkin->link( + return $this->mView->skin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/status/' . $value ), htmlspecialchars( $this->mView->statusDesc( $value ) ) ); case 'cpc_user_text': - return $this->mView->mSkin->userLink( - 1, $value ); + return $this->mView->skin->userLink( - 1, $value ); case 'cpc_removed': return wfMsgHtml( $value ? "code-status-$value" : "code-status-new" ); case 'cpc_added': Modified: trunk/extensions/CodeReview/ui/CodeStatusListView.php =================================================================== --- trunk/extensions/CodeReview/ui/CodeStatusListView.php 2010-11-06 18:28:08 UTC (rev 76205) +++ trunk/extensions/CodeReview/ui/CodeStatusListView.php 2010-11-06 18:51:45 UTC (rev 76206) @@ -15,7 +15,7 @@ $table_rows = ''; foreach ( $states as $state ) { - $link = $this->mSkin->link( + $link = $this->skin->link( SpecialPage::getTitleFor( 'Code', $name . "/status/$state" ), wfMsg( "code-status-".$state ) ); Modified: trunk/extensions/CodeReview/ui/SpecialCode.php =================================================================== --- trunk/extensions/CodeReview/ui/SpecialCode.php 2010-11-06 18:28:08 UTC (rev 76205) +++ trunk/extensions/CodeReview/ui/SpecialCode.php 2010-11-06 18:51:45 UTC (rev 76206) @@ -22,7 +22,7 @@ $view->execute(); } else { $wgOut->addWikiText( wfMsg( 'nosuchactiontext' ) ); - $wgOut->returnToMain( null, SpecialPage::getTitleFor( 'Code' ) ); + $wgOut->returnToMain( null, $this->getTitle() ); return; } @@ -137,7 +137,7 @@ function __construct() { global $wgUser; - $this->mSkin = $wgUser->getSkin(); + $this->skin = $wgUser->getSkin(); } function validPost( $permission ) { @@ -162,7 +162,7 @@ function authorLink( $author, $extraParams = array() ) { $repo = $this->mRepo->getName(); $special = SpecialPage::getTitleFor( 'Code', "$repo/author/$author" ); - return $this->mSkin->link( $special, htmlspecialchars( $author ), array(), $extraParams ); + return $this->skin->link( $special, htmlspecialchars( $author ), array(), $extraParams ); } function statusDesc( $status ) { _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs