r81911 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81910‎ | r81911 | r81912 >
Date:18:50, 10 February 2011
Author:ialex
Status:deferred
Tags:
Comment:
use getTitle() instead of $wgTitle
Modified paths:
  • /trunk/extensions/CloseWikis/CloseWikis.page.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CloseWikis/CloseWikis.page.php
@@ -55,7 +55,7 @@
5656 }
5757
5858 protected function closeForm() {
59 - global $wgOut, $wgUser, $wgRequest, $wgTitle;
 59+ global $wgOut, $wgUser, $wgRequest;
6060
6161 $status = '';
6262 $statusOK = false;
@@ -71,7 +71,7 @@
7272 if( $statusOK ) {
7373 $status = wfMsgExt( 'closewikis-page-close-success', 'parseinline' );
7474 $logpage = new LogPage( 'closewiki' );
75 - $logpage->addEntry( 'close', $wgTitle /* dummy */, $lreason, array( $wiki ) );
 75+ $logpage->addEntry( 'close', $this->getTitle() /* dummy */, $lreason, array( $wiki ) );
7676 } else {
7777 $status = wfMsgExt( 'closewikis-page-err-closed', 'parseinline' );
7878 }
@@ -93,7 +93,7 @@
9494 $statusStyle = $statusOK ? 'success' : 'error';
9595 $wgOut->addHTML( "<p><strong class=\"{$statusStyle}\">{$status}</strong></p>" );
9696 }
97 - $wgOut->addHTML( '<form method="post" action="' . htmlspecialchars( $wgTitle->getLocalURL() ) . '">' );
 97+ $wgOut->addHTML( '<form method="post" action="' . htmlspecialchars( $this->getTitle()->getLocalURL() ) . '">' );
9898 $form = array();
9999 $form['closewikis-page-close-wiki'] = $this->buildSelect( CloseWikis::getUnclosedList(), 'wpcWiki', $defaultWiki );
100100 $form['closewikis-page-close-dreason'] = Xml::textarea( 'wpcDisplayReason', $defaultDisplayReason );
@@ -104,7 +104,7 @@
105105 }
106106
107107 protected function reopenForm() {
108 - global $wgOut, $wgUser, $wgRequest, $wgTitle;
 108+ global $wgOut, $wgUser, $wgRequest;
109109
110110 $status = '';
111111 $statusOK = false;
@@ -119,7 +119,7 @@
120120 if( $statusOK ) {
121121 $status = wfMsgExt( 'closewikis-page-reopen-success', 'parseinline' );
122122 $logpage = new LogPage( 'closewiki' );
123 - $logpage->addEntry( 'reopen', $wgTitle /* dummy */, $lreason, array( $wiki ) );
 123+ $logpage->addEntry( 'reopen', $this->getTitle() /* dummy */, $lreason, array( $wiki ) );
124124 } else {
125125 $status = wfMsgExt( 'closewikis-page-err-opened', 'parseinline' );
126126 }
@@ -137,7 +137,7 @@
138138 $statusStyle = $statusOK ? 'success' : 'error';
139139 $wgOut->addHTML( "<p><strong class=\"{$statusStyle}\">{$status}</strong></p>" );
140140 }
141 - $wgOut->addHTML( '<form method="post" action="' . htmlspecialchars( $wgTitle->getLocalURL() ) . '">' );
 141+ $wgOut->addHTML( '<form method="post" action="' . htmlspecialchars( $this->getTitle()->getLocalURL() ) . '">' );
142142 $form = array();
143143 $form['closewikis-page-reopen-wiki'] = $this->buildSelect( CloseWikis::getList(), 'wprWiki', $defaultWiki );
144144 $form['closewikis-page-reopen-reason'] = Xml::input( 'wprReason', false, $defaultReason );

Status & tagging log