r46810 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46809‎ | r46810 | r46811 >
Date:19:43, 4 February 2009
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Removed check for empty( $action ), seems to be old register_globals code, but since $action is set in index.php with
$action = $wgRequest->getVal( 'action', 'view' );
it can't match empty() in "normal" conditions
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -309,20 +309,20 @@
310310 }
311311 }
312312
313 - public function setHTMLTitle( $name ) {$this->mHTMLtitle = $name; }
 313+ public function setHTMLTitle( $name ) { $this->mHTMLtitle = $name; }
314314 public function setPageTitle( $name ) {
315 - global $action, $wgContLang;
316 - $name = $wgContLang->convert($name, true);
 315+ global $wgContLang;
 316+ $name = $wgContLang->convert( $name, true );
317317 $this->mPagetitle = $name;
318 - if(!empty($action)) {
319 - $taction = $this->getPageTitleActionText();
320 - if( !empty( $taction ) ) {
321 - $name .= ' - '.$taction;
322 - }
 318+
 319+ $taction = $this->getPageTitleActionText();
 320+ if( !empty( $taction ) ) {
 321+ $name .= ' - '.$taction;
323322 }
324323
325324 $this->setHTMLTitle( wfMsg( 'pagetitle', $name ) );
326325 }
 326+
327327 public function getHTMLTitle() { return $this->mHTMLtitle; }
328328 public function getPageTitle() { return $this->mPagetitle; }
329329 public function setSubtitle( $str ) { $this->mSubtitle = /*$this->parse(*/$str/*)*/; } // @bug 2514

Follow-up revisions

RevisionCommit summaryAuthorDate
r47270* Removed "global $action;" from SkinTemplate::outputPage(), getting it from ...ialex17:09, 14 February 2009

Comments

#Comment by Aaron Schulz (talk | contribs)   04:51, 5 February 2009

Nothing should use $action anyway

#Comment by Aaron Schulz (talk | contribs)   04:51, 5 February 2009

Nothing should use $action anyway

Status & tagging log