From 40e38d8e2d311cea0dc342e2b6f3e4c32445573c Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 17 Jan 2010 01:47:44 +0000 Subject: [PATCH] Use getTitle() instead of mTitle Might prevent fatal errors caused by r61071, as suggested by code review there. --- includes/OutputPage.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index f1a368f936..a4cbeccfd6 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1666,10 +1666,10 @@ class OutputPage { # Crazy edit-on-double-click stuff $action = $wgRequest->getVal( 'action', 'view' ); - if ( $this->mTitle->getNamespace() != NS_SPECIAL + if ( $this->getTitle()->getNamespace() != NS_SPECIAL && !in_array( $action, array( 'edit', 'submit' ) ) && $wgUser->getOption( 'editondblclick' ) ) { - $bodyAttrs['ondblclick'] = "document.location = '" . Xml::escapeJsString( $this->mTitle->getEditURL() ) . "'"; + $bodyAttrs['ondblclick'] = "document.location = '" . Xml::escapeJsString( $this->getTitle()->getEditURL() ) . "'"; } # Class bloat @@ -1679,15 +1679,15 @@ class OutputPage { # A class is probably not the best way to do this . . . $bodyAttrs['class'] .= ' capitalize-all-nouns'; } - $bodyAttrs['class'] .= ' ns-' . $this->mTitle->getNamespace(); - if ( $this->mTitle->getNamespace() == NS_SPECIAL ) { + $bodyAttrs['class'] .= ' ns-' . $this->getTitle()->getNamespace(); + if ( $this->getTitle()->getNamespace() == NS_SPECIAL ) { $bodyAttrs['class'] .= ' ns-special'; - } elseif ( $this->mTitle->isTalkPage() ) { + } elseif ( $this->getTitle()->isTalkPage() ) { $bodyAttrs['class'] .= ' ns-talk'; } else { $bodyAttrs['class'] .= ' ns-subject'; } - $bodyAttrs['class'] .= ' ' . Sanitizer::escapeClass( 'page-' . $this->mTitle->getPrefixedText() ); + $bodyAttrs['class'] .= ' ' . Sanitizer::escapeClass( 'page-' . $this->getTitle()->getPrefixedText() ); $bodyAttrs['class'] .= ' skin-' . Sanitizer::escapeClass( $wgUser->getSkin()->getSkinName() ); $ret .= Html::openElement( 'body', $bodyAttrs ) . "\n"; -- 2.20.1