r61158 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61157‎ | r61158 | r61159 >
Date:01:47, 17 January 2010
Author:simetrical
Status:ok
Tags:
Comment:
Use getTitle() instead of mTitle

Might prevent fatal errors caused by r61071, as suggested by code review
there.
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1666,10 +1666,10 @@
16671667 # Crazy edit-on-double-click stuff
16681668 $action = $wgRequest->getVal( 'action', 'view' );
16691669
1670 - if ( $this->mTitle->getNamespace() != NS_SPECIAL
 1670+ if ( $this->getTitle()->getNamespace() != NS_SPECIAL
16711671 && !in_array( $action, array( 'edit', 'submit' ) )
16721672 && $wgUser->getOption( 'editondblclick' ) ) {
1673 - $bodyAttrs['ondblclick'] = "document.location = '" . Xml::escapeJsString( $this->mTitle->getEditURL() ) . "'";
 1673+ $bodyAttrs['ondblclick'] = "document.location = '" . Xml::escapeJsString( $this->getTitle()->getEditURL() ) . "'";
16741674 }
16751675
16761676 # Class bloat
@@ -1679,15 +1679,15 @@
16801680 # A <body> class is probably not the best way to do this . . .
16811681 $bodyAttrs['class'] .= ' capitalize-all-nouns';
16821682 }
1683 - $bodyAttrs['class'] .= ' ns-' . $this->mTitle->getNamespace();
1684 - if ( $this->mTitle->getNamespace() == NS_SPECIAL ) {
 1683+ $bodyAttrs['class'] .= ' ns-' . $this->getTitle()->getNamespace();
 1684+ if ( $this->getTitle()->getNamespace() == NS_SPECIAL ) {
16851685 $bodyAttrs['class'] .= ' ns-special';
1686 - } elseif ( $this->mTitle->isTalkPage() ) {
 1686+ } elseif ( $this->getTitle()->isTalkPage() ) {
16871687 $bodyAttrs['class'] .= ' ns-talk';
16881688 } else {
16891689 $bodyAttrs['class'] .= ' ns-subject';
16901690 }
1691 - $bodyAttrs['class'] .= ' ' . Sanitizer::escapeClass( 'page-' . $this->mTitle->getPrefixedText() );
 1691+ $bodyAttrs['class'] .= ' ' . Sanitizer::escapeClass( 'page-' . $this->getTitle()->getPrefixedText() );
16921692 $bodyAttrs['class'] .= ' skin-' . Sanitizer::escapeClass( $wgUser->getSkin()->getSkinName() );
16931693
16941694 $ret .= Html::openElement( 'body', $bodyAttrs ) . "\n";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61071Merge all skins' output of opening <body> tag...simetrical01:16, 15 January 2010

Status & tagging log