r84262 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84261‎ | r84262 | r84263 >
Date:20:37, 18 March 2011
Author:mah
Status:ok
Tags:
Comment:
w/s diff. mostly eol w/s and using only tabs of width 4 to indent.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialAllmessages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialAllpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlock.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlockList.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBooksources.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBrokenRedirects.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialCategories.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialConfirmemail.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDeadendpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDisambiguations.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDoubleRedirects.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialEmailuser.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialExport.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialFileDuplicateSearch.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialFilepath.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialImport.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialLinkSearch.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListfiles.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListgrouprights.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListredirects.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialLonelypages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMIMEsearch.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMergeHistory.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMostcategories.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMostlinked.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMostlinkedcategories.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMostlinkedtemplates.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMostrevisions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewimages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPrefixindex.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialProtectedpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRandompage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchangeslinked.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialResetpass.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialSpecialpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialStatistics.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialTags.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUnblock.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUncategorizedimages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUncategorizedpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUnusedimages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUnusedtemplates.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUnwatchedpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUploadStash.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWantedfiles.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWithoutinterwiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialAllpages.php
@@ -20,7 +20,7 @@
2121 * @file
2222 * @ingroup SpecialPage
2323 */
24 -
 24+
2525 /**
2626 * Implements Special:Allpages
2727 *
@@ -71,7 +71,7 @@
7272
7373 $namespaces = $wgContLang->getNamespaces();
7474
75 - $wgOut->setPagetitle(
 75+ $wgOut->setPagetitle(
7676 ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces) ) ) ?
7777 wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) :
7878 wfMsg( 'allarticles' )
@@ -97,7 +97,7 @@
9898 function namespaceForm( $namespace = NS_MAIN, $from = '', $to = '' ) {
9999 global $wgScript;
100100 $t = $this->getTitle();
101 -
 101+
102102 $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
103103 $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
104104 $out .= Html::hidden( 'title', $t->getPrefixedText() );
@@ -374,7 +374,7 @@
375375 'page_title',
376376 array( 'page_namespace' => $namespace, 'page_title < '.$dbr->addQuotes($from) ),
377377 __METHOD__,
378 - array( 'ORDER BY' => 'page_title DESC',
 378+ array( 'ORDER BY' => 'page_title DESC',
379379 'LIMIT' => $this->maxPerPage, 'OFFSET' => ($this->maxPerPage - 1 )
380380 )
381381 );
Index: trunk/phase3/includes/specials/SpecialUnblock.php
@@ -142,7 +142,7 @@
143143 break;
144144 }
145145 }
146 -
 146+
147147 } else {
148148 $fields['Target']['default'] = $this->target;
149149 unset( $fields['Name'] );
Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -222,7 +222,7 @@
223223 $user->removeGroup( $group );
224224 }
225225 }
226 - if( $add ) {
 226+ if( $add ) {
227227 $newGroups = array_merge( $newGroups, $add );
228228 foreach( $add as $group ) {
229229 $user->addGroup( $group );
Index: trunk/phase3/includes/specials/SpecialAllmessages.php
@@ -167,7 +167,7 @@
168168 protected $mSkin;
169169
170170 /**
171 - * @var Language
 171+ * @var Language
172172 */
173173 public $lang;
174174
Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php
@@ -172,16 +172,16 @@
173173 else
174174 $order = array();
175175
176 -
177 - $query = $dbr->selectSQLText(
178 - array_merge( $tables, array( $link_table ) ),
179 - $select,
 176+
 177+ $query = $dbr->selectSQLText(
 178+ array_merge( $tables, array( $link_table ) ),
 179+ $select,
180180 $conds + $subconds,
181 - __METHOD__,
 181+ __METHOD__,
182182 $order + $query_options,
183183 $join_conds + array( $link_table => array( 'INNER JOIN', $subjoin ) )
184184 );
185 -
 185+
186186 if( $dbr->unionSupportsOrderAndLimit())
187187 $query = $dbr->limitResult( $query, $limit );
188188
@@ -197,7 +197,7 @@
198198 $sql = $dbr->unionQueries($subsql, false).' ORDER BY rc_timestamp DESC';
199199 $sql = $dbr->limitResult($sql, $limit, false);
200200 }
201 -
 201+
202202 $res = $dbr->query( $sql, __METHOD__ );
203203
204204 if( $res->numRows() == 0 )
@@ -205,7 +205,7 @@
206206
207207 return $res;
208208 }
209 -
 209+
210210 function getExtraOptions( $opts ){
211211 $opts->consumeValues( array( 'showlinkedto', 'target', 'tagfilter' ) );
212212 $extraOpts = array();
@@ -252,7 +252,7 @@
253253
254254 function setBottomText( OutputPage $out, FormOptions $opts ) {
255255 if( isset( $this->mResultEmpty ) && $this->mResultEmpty ){
256 - $out->addWikiMsg( 'recentchangeslinked-noresult' );
 256+ $out->addWikiMsg( 'recentchangeslinked-noresult' );
257257 }
258258 }
259259 }
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -111,7 +111,7 @@
112112 $res = $dbr->select( 'archive',
113113 array( 'ar_minor_edit', 'ar_timestamp', 'ar_user', 'ar_user_text', 'ar_comment', 'ar_len', 'ar_deleted' ),
114114 array( 'ar_namespace' => $this->title->getNamespace(),
115 - 'ar_title' => $this->title->getDBkey() ),
 115+ 'ar_title' => $this->title->getDBkey() ),
116116 'PageArchive::listRevisions',
117117 array( 'ORDER BY' => 'ar_timestamp DESC' ) );
118118 $ret = $dbr->resultObject( $res );
@@ -194,8 +194,8 @@
195195 'ar_deleted',
196196 'ar_len' ),
197197 array( 'ar_namespace' => $this->title->getNamespace(),
198 - 'ar_title' => $this->title->getDBkey(),
199 - 'ar_timestamp' => $dbr->timestamp( $timestamp ) ),
 198+ 'ar_title' => $this->title->getDBkey(),
 199+ 'ar_timestamp' => $dbr->timestamp( $timestamp ) ),
200200 __METHOD__ );
201201 if( $row ) {
202202 return Revision::newFromArchiveRow( $row, array( 'page' => $this->title->getArticleId() ) );
@@ -221,8 +221,8 @@
222222 $row = $dbr->selectRow( 'archive',
223223 'ar_timestamp',
224224 array( 'ar_namespace' => $this->title->getNamespace(),
225 - 'ar_title' => $this->title->getDBkey(),
226 - 'ar_timestamp < ' .
 225+ 'ar_title' => $this->title->getDBkey(),
 226+ 'ar_timestamp < ' .
227227 $dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ),
228228 __METHOD__,
229229 array(
@@ -293,7 +293,7 @@
294294 $row = $dbr->selectRow( 'archive',
295295 array( 'ar_text', 'ar_flags', 'ar_text_id' ),
296296 array( 'ar_namespace' => $this->title->getNamespace(),
297 - 'ar_title' => $this->title->getDBkey() ),
 297+ 'ar_title' => $this->title->getDBkey() ),
298298 __METHOD__,
299299 array( 'ORDER BY' => 'ar_timestamp DESC' ) );
300300 if( $row ) {
@@ -312,7 +312,7 @@
313313 $dbr = wfGetDB( DB_SLAVE );
314314 $n = $dbr->selectField( 'archive', 'COUNT(ar_title)',
315315 array( 'ar_namespace' => $this->title->getNamespace(),
316 - 'ar_title' => $this->title->getDBkey() ) );
 316+ 'ar_title' => $this->title->getDBkey() ) );
317317 return ($n > 0);
318318 }
319319
@@ -407,7 +407,7 @@
408408 $page = $dbw->selectRow( 'page',
409409 array( 'page_id', 'page_latest' ),
410410 array( 'page_namespace' => $this->title->getNamespace(),
411 - 'page_title' => $this->title->getDBkey() ),
 411+ 'page_title' => $this->title->getDBkey() ),
412412 __METHOD__,
413413 $options
414414 );
Index: trunk/phase3/includes/specials/SpecialImport.php
@@ -30,14 +30,14 @@
3131 * @ingroup SpecialPage
3232 */
3333 class SpecialImport extends SpecialPage {
34 -
 34+
3535 private $interwiki = false;
3636 private $namespace;
3737 private $frompage = '';
3838 private $logcomment= false;
3939 private $history = true;
4040 private $includeTemplates = false;
41 -
 41+
4242 /**
4343 * Constructor
4444 */
@@ -46,28 +46,28 @@
4747 global $wgImportTargetNamespace;
4848 $this->namespace = $wgImportTargetNamespace;
4949 }
50 -
 50+
5151 /**
5252 * Execute
5353 */
5454 function execute( $par ) {
5555 global $wgRequest;
56 -
 56+
5757 $this->setHeaders();
5858 $this->outputHeader();
59 -
 59+
6060 if ( wfReadOnly() ) {
6161 global $wgOut;
6262 $wgOut->readOnlyPage();
6363 return;
6464 }
65 -
 65+
6666 if ( $wgRequest->wasPosted() && $wgRequest->getVal( 'action' ) == 'submit' ) {
6767 $this->doImport();
6868 }
6969 $this->showForm();
7070 }
71 -
 71+
7272 /**
7373 * Do the actual import
7474 */
@@ -290,8 +290,8 @@
291291 private $mLogItemCount = 0;
292292
293293 function __construct( $importer, $upload, $interwiki , $reason=false ) {
294 - $this->mOriginalPageOutCallback =
295 - $importer->setPageOutCallback( array( $this, 'reportPage' ) );
 294+ $this->mOriginalPageOutCallback =
 295+ $importer->setPageOutCallback( array( $this, 'reportPage' ) );
296296 $this->mOriginalLogCallback =
297297 $importer->setLogItemCallback( array( $this, 'reportLogItem' ) );
298298 $this->mPageCount = 0;
@@ -304,7 +304,7 @@
305305 global $wgOut;
306306 $wgOut->addHTML( "<ul>\n" );
307307 }
308 -
 308+
309309 function reportLogItem( /* ... */ ) {
310310 $this->mLogItemCount++;
311311 if ( is_callable( $this->mOriginalLogCallback ) ) {
@@ -314,7 +314,7 @@
315315
316316 function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) {
317317 global $wgOut, $wgUser, $wgLang, $wgContLang;
318 -
 318+
319319 $args = func_get_args();
320320 call_user_func_array( $this->mOriginalPageOutCallback, $args );
321321
@@ -367,7 +367,7 @@
368368
369369 function close() {
370370 global $wgOut, $wgLang;
371 -
 371+
372372 if ( $this->mLogItemCount > 0 ) {
373373 $msg = wfMsgExt( 'imported-log-entries', 'parseinline',
374374 $wgLang->formatNum( $this->mLogItemCount ) );
Index: trunk/phase3/includes/specials/SpecialExport.php
@@ -92,13 +92,13 @@
9393 $page = $wgRequest->getText( 'pages' );
9494 $this->curonly = $wgRequest->getCheck( 'curonly' );
9595 $rawOffset = $wgRequest->getVal( 'offset' );
96 -
 96+
9797 if( $rawOffset ) {
9898 $offset = wfTimestamp( TS_MW, $rawOffset );
9999 } else {
100100 $offset = null;
101101 }
102 -
 102+
103103 $limit = $wgRequest->getInt( 'limit' );
104104 $dir = $wgRequest->getVal( 'dir' );
105105 $history = array(
@@ -107,7 +107,7 @@
108108 'limit' => $wgExportMaxHistory,
109109 );
110110 $historyCheck = $wgRequest->getCheck( 'history' );
111 -
 111+
112112 if ( $this->curonly ) {
113113 $history = WikiExporter::CURRENT;
114114 } elseif ( !$historyCheck ) {
@@ -129,7 +129,7 @@
130130 // Default to current-only for GET requests.
131131 $page = $wgRequest->getText( 'pages', $par );
132132 $historyCheck = $wgRequest->getCheck( 'history' );
133 -
 133+
134134 if( $historyCheck ) {
135135 $history = WikiExporter::FULL;
136136 } else {
@@ -153,20 +153,20 @@
154154
155155 if ( $this->doExport ) {
156156 $wgOut->disable();
157 -
 157+
158158 // Cancel output buffering and gzipping if set
159159 // This should provide safer streaming for pages with history
160160 wfResetOutputBuffers();
161161 $wgRequest->response()->header( "Content-type: application/xml; charset=utf-8" );
162 -
 162+
163163 if( $wgRequest->getCheck( 'wpDownload' ) ) {
164164 // Provide a sane filename suggestion
165165 $filename = urlencode( $wgSitename . '-' . wfTimestampNow() . '.xml' );
166166 $wgRequest->response()->header( "Content-disposition: attachment;filename={$filename}" );
167167 }
168 -
 168+
169169 $this->doExport( $page, $history, $list_authors );
170 -
 170+
171171 return;
172172 }
173173
@@ -195,14 +195,14 @@
196196 } else {
197197 $wgOut->addHTML( wfMsgExt( 'exportnohistory', 'parse' ) );
198198 }
199 -
 199+
200200 $form .= Xml::checkLabel(
201 - wfMsg( 'export-templates' ),
202 - 'templates',
203 - 'wpExportTemplates',
 201+ wfMsg( 'export-templates' ),
 202+ 'templates',
 203+ 'wpExportTemplates',
204204 $wgRequest->wasPosted() ? $wgRequest->getCheck( 'templates' ) : false
205205 ) . '<br />';
206 -
 206+
207207 if( $wgExportMaxLinkDepth || $this->userCanOverrideExportDepth() ) {
208208 $form .= Xml::inputLabel( wfMsg( 'export-pagelinks' ), 'pagelink-depth', 'pagelink-depth', 20, 0 ) . '<br />';
209209 }
@@ -217,7 +217,7 @@
218218
219219 $form .= Xml::submitButton( wfMsg( 'export-submit' ), $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'export' ) );
220220 $form .= Xml::closeElement( 'form' );
221 -
 221+
222222 $wgOut->addHTML( $form );
223223 }
224224
@@ -272,7 +272,7 @@
273273 foreach( $pages as $k => $v ) {
274274 $pages[$k] = str_replace( " ", "_", $v );
275275 }
276 -
 276+
277277 $pages = array_unique( $pages );
278278
279279 /* Ok, let's get to it... */
@@ -291,11 +291,11 @@
292292 set_time_limit(0);
293293 wfRestoreWarnings();
294294 }
295 -
 295+
296296 $exporter = new WikiExporter( $db, $history, $buffer );
297297 $exporter->list_authors = $list_authors;
298298 $exporter->openStream();
299 -
 299+
300300 foreach( $pages as $page ) {
301301 /*
302302 if( $wgExportMaxHistory && !$this->curonly ) {
@@ -322,7 +322,7 @@
323323 }
324324
325325 $exporter->closeStream();
326 -
 326+
327327 if( $lb ) {
328328 $lb->closeAll();
329329 }
@@ -343,7 +343,7 @@
344344 );
345345
346346 $pages = array();
347 -
 347+
348348 foreach ( $res as $row ) {
349349 $n = $row->page_title;
350350 if ($row->page_namespace) {
@@ -369,10 +369,10 @@
370370 );
371371
372372 $pages = array();
373 -
 373+
374374 foreach ( $res as $row ) {
375375 $n = $row->page_title;
376 -
 376+
377377 if ( $row->page_namespace ) {
378378 $ns = $wgContLang->getNsText( $row->page_namespace );
379379 $n = $ns . ':' . $n;
@@ -402,17 +402,17 @@
403403 */
404404 private function validateLinkDepth( $depth ) {
405405 global $wgExportMaxLinkDepth;
406 -
 406+
407407 if( $depth < 0 ) {
408408 return 0;
409409 }
410 -
 410+
411411 if ( !$this->userCanOverrideExportDepth() ) {
412412 if( $depth > $wgExportMaxLinkDepth ) {
413413 return $wgExportMaxLinkDepth;
414414 }
415415 }
416 -
 416+
417417 /*
418418 * There's a HARD CODED limit of 5 levels of recursion here to prevent a
419419 * crazy-big export from being done by someone setting the depth
@@ -426,21 +426,21 @@
427427 for( ; $depth > 0; --$depth ) {
428428 $pageSet = $this->getLinks(
429429 $inputPages, $pageSet, 'pagelinks',
430 - array( 'pl_namespace AS namespace', 'pl_title AS title' ),
 430+ array( 'pl_namespace AS namespace', 'pl_title AS title' ),
431431 array( 'page_id=pl_from' )
432432 );
433433 $inputPages = array_keys( $pageSet );
434434 }
435 -
 435+
436436 return $pageSet;
437437 }
438438
439439 /**
440440 * Expand a list of pages to include images used in those pages.
441 - *
 441+ *
442442 * @param $inputPages array, list of titles to look up
443443 * @param $pageSet array, associative array indexed by titles for output
444 - *
 444+ *
445445 * @return array associative array index by titles
446446 */
447447 private function getImages( $inputPages, $pageSet ) {
@@ -458,10 +458,10 @@
459459 */
460460 private function getLinks( $inputPages, $pageSet, $table, $fields, $join ) {
461461 $dbr = wfGetDB( DB_SLAVE );
462 -
 462+
463463 foreach( $inputPages as $page ) {
464464 $title = Title::newFromText( $page );
465 -
 465+
466466 if( $title ) {
467467 $pageSet[$title->getPrefixedText()] = true;
468468 /// @todo Fixme: May or may not be more efficient to batch these
@@ -478,15 +478,15 @@
479479 ),
480480 __METHOD__
481481 );
482 -
 482+
483483 foreach( $result as $row ) {
484484 $template = Title::makeTitle( $row->namespace, $row->title );
485485 $pageSet[$template->getPrefixedText()] = true;
486486 }
487487 }
488488 }
489 -
 489+
490490 return $pageSet;
491491 }
492 -
 492+
493493 }
Index: trunk/phase3/includes/specials/SpecialDisambiguations.php
@@ -77,7 +77,7 @@
7878 $set = 'FALSE';
7979 wfDebug("Mediawiki:disambiguationspage message does not link to any templates!\n");
8080 }
81 -
 81+
8282 // FIXME: What are pagelinks and p2 doing here?
8383 return array (
8484 'tables' => array( 'templatelinks', 'p1' => 'page', 'pagelinks', 'p2' => 'page' ),
@@ -96,11 +96,11 @@
9797 function getOrderFields() {
9898 return array( 'tl_namespace', 'tl_title', 'value' );
9999 }
100 -
 100+
101101 function sortDescending() {
102102 return false;
103103 }
104 -
 104+
105105 /**
106106 * Fetch links and cache their existence
107107 */
Index: trunk/phase3/includes/specials/SpecialMostrevisions.php
@@ -27,7 +27,7 @@
2828 function __construct( $name = 'Mostrevisions' ) {
2929 parent::__construct( $name );
3030 }
31 -
 31+
3232 function sortDescending() {
3333 return true;
3434 }
Index: trunk/phase3/includes/specials/SpecialBrokenRedirects.php
@@ -32,7 +32,7 @@
3333 function __construct( $name = 'BrokenRedirects' ) {
3434 parent::__construct( $name );
3535 }
36 -
 36+
3737 function isExpensive() { return true; }
3838 function isSyndicated() { return false; }
3939 function sortDescending() { return false; }
Index: trunk/phase3/includes/specials/SpecialCategories.php
@@ -69,12 +69,12 @@
7070 $this->mOffset = $from;
7171 }
7272 }
73 -
 73+
7474 function getQueryInfo() {
7575 return array(
7676 'tables' => array( 'category' ),
7777 'fields' => array( 'cat_title','cat_pages' ),
78 - 'conds' => array( 'cat_pages > 0' ),
 78+ 'conds' => array( 'cat_pages > 0' ),
7979 'options' => array( 'USE INDEX' => 'cat_title' ),
8080 );
8181 }
@@ -121,11 +121,11 @@
122122 $wgLang->formatNum( $result->cat_pages ) );
123123 return Xml::tags('li', null, "$titleText ($count)" ) . "\n";
124124 }
125 -
 125+
126126 public function getStartForm( $from ) {
127127 global $wgScript;
128128 $t = SpecialPage::getTitleFor( 'Categories' );
129 -
 129+
130130 return
131131 Xml::tags( 'form', array( 'method' => 'get', 'action' => $wgScript ),
132132 Html::hidden( 'title', $t->getPrefixedText() ) .
Index: trunk/phase3/includes/specials/SpecialBlockList.php
@@ -85,7 +85,7 @@
8686 $form->setWrapperLegend( wfMsg( 'ipblocklist-legend' ) );
8787 $form->setSubmitText( wfMsg( 'ipblocklist-submit' ) );
8888 $form->prepareForm();
89 -
 89+
9090 $form->displayForm( '' );
9191 $this->showList();
9292 }
@@ -142,7 +142,7 @@
143143 $chunk = self::getIpFragment( $start );
144144 $dbr = wfGetDB( DB_SLAVE );
145145 $like = $dbr->buildLike( $chunk, $dbr->anyString() );
146 -
 146+
147147 # Fairly hard to make a malicious SQL statement out of hex characters,
148148 # but stranger things have happened...
149149 $safeStart = $dbr->addQuotes( IP::toHex( $start ) );
Index: trunk/phase3/includes/specials/SpecialMostcategories.php
@@ -34,7 +34,7 @@
3535 function __construct( $name = 'Mostcategories' ) {
3636 parent::__construct( $name );
3737 }
38 -
 38+
3939 function isExpensive() { return true; }
4040 function isSyndicated() { return false; }
4141
Index: trunk/phase3/includes/specials/SpecialStatistics.php
@@ -28,21 +28,21 @@
2929 * @ingroup SpecialPage
3030 */
3131 class SpecialStatistics extends SpecialPage {
32 -
 32+
3333 private $views, $edits, $good, $images, $total, $users,
3434 $activeUsers = 0;
35 -
 35+
3636 public function __construct() {
3737 parent::__construct( 'Statistics' );
3838 }
39 -
 39+
4040 public function execute( $par ) {
4141 global $wgOut, $wgMemc;
4242 global $wgDisableCounters, $wgMiserMode;
43 -
 43+
4444 $this->setHeaders();
4545 $wgOut->addModuleStyles( 'mediawiki.special' );
46 -
 46+
4747 $this->views = SiteStats::views();
4848 $this->edits = SiteStats::edits();
4949 $this->good = SiteStats::articles();
@@ -51,13 +51,13 @@
5252 $this->users = SiteStats::users();
5353 $this->activeUsers = SiteStats::activeUsers();
5454 $this->hook = '';
55 -
 55+
5656 # Staticic - views
5757 $viewsStats = '';
5858 if( !$wgDisableCounters ) {
5959 $viewsStats = $this->getViewsStats();
6060 }
61 -
 61+
6262 # Set active user count
6363 if( !$wgMiserMode ) {
6464 $key = wfMemcKey( 'sitestats', 'activeusers-updated' );
@@ -88,7 +88,7 @@
8989 if( !$wgDisableCounters && !$wgMiserMode ) {
9090 $text .= $this->getMostViewedPages();
9191 }
92 -
 92+
9393 # Statistic - other
9494 $extraStats = array();
9595 if( wfRunHooks( 'SpecialStatsAddExtra', array( &$extraStats ) ) ) {
@@ -120,7 +120,7 @@
121121 $msg = wfMessage( $descMsg, $descMsgParam );
122122 if ( $msg->exists() ) {
123123 $descriptionText = $msg->parse();
124 - $text .= "<br />" . Xml::element( 'small', array( 'class' => 'mw-statistic-desc'),
 124+ $text .= "<br />" . Xml::element( 'small', array( 'class' => 'mw-statistic-desc'),
125125 " ($descriptionText)" );
126126 }
127127 }
@@ -130,7 +130,7 @@
131131 Html::rawElement( 'td', array( 'class' => 'mw-statistics-numbers' ), $number )
132132 );
133133 }
134 -
 134+
135135 /**
136136 * Each of these methods is pretty self-explanatory, get a particular
137137 * row for the table of statistics
@@ -244,7 +244,7 @@
245245 $wgLang->formatNum( $this->views ),
246246 array ( 'class' => 'mw-statistics-views-total' ), 'statistics-views-total-desc' ) .
247247 $this->formatRow( wfMsgExt( 'statistics-views-peredit', array( 'parseinline' ) ),
248 - $wgLang->formatNum( sprintf( '%.2f', $this->edits ?
 248+ $wgLang->formatNum( sprintf( '%.2f', $this->edits ?
249249 $this->views / $this->edits : 0 ) ),
250250 array ( 'class' => 'mw-statistics-views-peredit' ) );
251251 }
@@ -280,7 +280,7 @@
281281 if( $title instanceof Title ) {
282282 $text .= $this->formatRow( $sk->link( $title ),
283283 $wgLang->formatNum( $row->page_counter ) );
284 -
 284+
285285 }
286286 }
287287 $res->free();
@@ -297,14 +297,14 @@
298298 $return = Xml::openElement( 'tr' ) .
299299 Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-hooks', array( 'parseinline' ) ) ) .
300300 Xml::closeElement( 'tr' );
301 -
 301+
302302 foreach( $stats as $name => $number ) {
303303 $name = htmlspecialchars( $name );
304304 $number = htmlspecialchars( $number );
305 -
 305+
306306 $return .= $this->formatRow( $name, $wgLang->formatNum( $number ), array( 'class' => 'mw-statistics-hook' ) );
307307 }
308 -
 308+
309309 return $return;
310310 }
311311 }
Index: trunk/phase3/includes/specials/SpecialFilepath.php
@@ -46,14 +46,14 @@
4747 $this->showForm( $title );
4848 } else {
4949 $file = wfFindFile( $title );
50 -
 50+
5151 if ( $file && $file->exists() ) {
5252 // Default behaviour: Use the direct link to the file.
5353 $url = $file->getURL();
5454 $width = $wgRequest->getInt( 'width', -1 );
5555 $height = $wgRequest->getInt( 'height', -1 );
5656
57 - // If a width is requested...
 57+ // If a width is requested...
5858 if ( $width != -1 ) {
5959 $mto = $file->transform( array( 'width' => $width, 'height' => $height ) );
6060 // ... and we can
Index: trunk/phase3/includes/specials/SpecialListfiles.php
@@ -20,7 +20,7 @@
2121 * @file
2222 * @ingroup SpecialPage
2323 */
24 -
 24+
2525 function wfSpecialListfiles( $par = null ) {
2626 global $wgOut;
2727
@@ -39,7 +39,7 @@
4040 var $mFieldNames = null;
4141 var $mQueryConds = array();
4242 var $mUserName = null;
43 -
 43+
4444 function __construct( $par = null ) {
4545 global $wgRequest, $wgMiserMode;
4646 if ( $wgRequest->getText( 'sort', 'img_date' ) == 'img_date' ) {
@@ -47,7 +47,7 @@
4848 } else {
4949 $this->mDefaultDirection = false;
5050 }
51 -
 51+
5252 $userName = $wgRequest->getText( 'user', $par );
5353 if ( $userName ) {
5454 $nt = Title::newFromText( $userName, NS_USER );
@@ -55,14 +55,14 @@
5656 $this->mUserName = $nt->getText();
5757 $this->mQueryConds['img_user_text'] = $this->mUserName;
5858 }
59 - }
60 -
 59+ }
 60+
6161 $search = $wgRequest->getText( 'ilsearch' );
6262 if ( $search != '' && !$wgMiserMode ) {
6363 $nt = Title::newFromURL( $search );
6464 if ( $nt ) {
6565 $dbr = wfGetDB( DB_SLAVE );
66 - $this->mQueryConds[] = 'LOWER(img_name)' . $dbr->buildLike( $dbr->anyString(),
 66+ $this->mQueryConds[] = 'LOWER(img_name)' . $dbr->buildLike( $dbr->anyString(),
6767 strtolower( $nt->getDBkey() ), $dbr->anyString() );
6868 }
6969 }
@@ -232,7 +232,7 @@
233233 function getSortHeaderClass() {
234234 return 'listfiles_sort ' . parent::getSortHeaderClass();
235235 }
236 -
 236+
237237 function getPagingQueries() {
238238 $queries = parent::getPagingQueries();
239239 if ( !is_null( $this->mUserName ) ) {
Index: trunk/phase3/includes/specials/SpecialSpecialpages.php
@@ -108,7 +108,7 @@
109109 );
110110 foreach( $sortedPages as $desc => $specialpage ) {
111111 list( $title, $restricted, $expensive) = $specialpage;
112 -
 112+
113113 $pageClasses = array();
114114 if ( $expensive && $wgMiserMode ){
115115 $includesCachedPages = true;
@@ -118,7 +118,7 @@
119119 $includesRestrictedPages = true;
120120 $pageClasses[] = 'mw-specialpagerestricted';
121121 }
122 -
 122+
123123 $link = $sk->linkKnown( $title , htmlspecialchars( $desc ) );
124124 $wgOut->addHTML( Html::rawElement( 'li', array( 'class' => implode( ' ', $pageClasses ) ), $link ) . "\n" );
125125
Index: trunk/phase3/includes/specials/SpecialFileDuplicateSearch.php
@@ -89,13 +89,13 @@
9090 'conds' => array( 'img_sha1' => $this->hash )
9191 );
9292 }
93 -
 93+
9494 function execute( $par ) {
9595 global $wgRequest, $wgOut, $wgLang, $wgContLang, $wgScript;
96 -
 96+
9797 $this->setHeaders();
9898 $this->outputHeader();
99 -
 99+
100100 $this->filename = isset( $par ) ? $par : $wgRequest->getText( 'filename' );
101101 $this->file = null;
102102 $this->hash = '';
Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -61,7 +61,7 @@
6262 'savedprefs'
6363 );
6464 }
65 -
 65+
6666 if ( $wgRequest->getCheck( 'eauth' ) ) {
6767 $wgOut->wrapWikiMsg( "<div class='error' style='clear: both;'>\n$1\n</div>",
6868 'eauthentsent', $wgUser->getName() );
Index: trunk/phase3/includes/specials/SpecialUnwatchedpages.php
@@ -34,7 +34,7 @@
3535 function __construct( $name = 'Unwatchedpages' ) {
3636 parent::__construct( $name, 'unwatchedpages' );
3737 }
38 -
 38+
3939 function isExpensive() { return true; }
4040 function isSyndicated() { return false; }
4141
@@ -55,7 +55,7 @@
5656 }
5757
5858 function sortDescending() { return false; }
59 -
 59+
6060 function getOrderFields() {
6161 return array( 'page_namespace', 'page_title' );
6262 }
Index: trunk/phase3/includes/specials/SpecialWantedfiles.php
@@ -34,7 +34,7 @@
3535 function __construct( $name = 'Wantedfiles' ) {
3636 parent::__construct( $name );
3737 }
38 -
 38+
3939 /**
4040 * KLUGE: The results may contain false positives for files
4141 * that exist e.g. in a shared repo. Setting this at least
@@ -53,10 +53,10 @@
5454 'COUNT(*) AS value' ),
5555 'conds' => array ( 'img_name IS NULL' ),
5656 'options' => array ( 'GROUP BY' => 'il_to' ),
57 - 'join_conds' => array ( 'image' =>
 57+ 'join_conds' => array ( 'image' =>
5858 array ( 'LEFT JOIN',
59 - array ( 'il_to = img_name' )
60 - )
 59+ array ( 'il_to = img_name' )
 60+ )
6161 )
6262 );
6363 }
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -89,9 +89,9 @@
9090 $this->mPosted = $request->wasPosted();
9191 $this->mCreateaccount = $request->getCheck( 'wpCreateaccount' );
9292 $this->mCreateaccountMail = $request->getCheck( 'wpCreateaccountMail' )
93 - && $wgEnableEmail;
 93+ && $wgEnableEmail;
9494 $this->mMailmypassword = $request->getCheck( 'wpMailmypassword' )
95 - && $wgEnableEmail;
 95+ && $wgEnableEmail;
9696 $this->mLoginattempt = $request->getCheck( 'wpLoginattempt' );
9797 $this->mAction = $request->getVal( 'action' );
9898 $this->mRemember = $request->getCheck( 'wpRemember' );
@@ -111,9 +111,9 @@
112112 $this->mEmail = '';
113113 }
114114 if( !in_array( 'realname', $wgHiddenPrefs ) ) {
115 - $this->mRealName = $request->getText( 'wpRealName' );
 115+ $this->mRealName = $request->getText( 'wpRealName' );
116116 } else {
117 - $this->mRealName = '';
 117+ $this->mRealName = '';
118118 }
119119
120120 if( !$wgAuth->validDomain( $this->mDomain ) ) {
Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -381,7 +381,7 @@
382382
383383 # Build up the form
384384 $f = Xml::openElement( 'form', array( 'action' => $wgScript ) );
385 -
 385+
386386 # Values that should not be forgotten
387387 $f .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() );
388388 foreach ( $this->opts->getUnconsumedValues() as $name => $value ) {
@@ -413,7 +413,7 @@
414414
415415 /**
416416 * Create filter panel
417 - *
 417+ *
418418 * @return string HTML fieldset and filter panel with the show/hide links
419419 */
420420 function getFilterPanel() {
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -298,8 +298,8 @@
299299 MWNamespace::getAssociated( $opts['namespace'] )
300300 );
301301 $condition = "(rc_namespace $operator $selectedNS "
302 - . $boolean
303 - . " rc_namespace $operator $associatedNS)";
 302+ . $boolean
 303+ . " rc_namespace $operator $associatedNS)";
304304 }
305305
306306 $conds[] = $condition;
Index: trunk/phase3/includes/specials/SpecialLonelypages.php
@@ -32,7 +32,7 @@
3333 function __construct( $name = 'Lonelypages' ) {
3434 parent::__construct( $name );
3535 }
36 -
 36+
3737 function getPageHeader() {
3838 return wfMsgExt( 'lonelypagestext', array( 'parse' ) );
3939 }
@@ -68,7 +68,7 @@
6969 'tl_title = page_title' ) ) )
7070 );
7171 }
72 -
 72+
7373 function getOrderFields() {
7474 // For some crazy reason ordering by a constant
7575 // causes a filesort in MySQL 5
Index: trunk/phase3/includes/specials/SpecialUncategorizedpages.php
@@ -58,7 +58,7 @@
5959 'LEFT JOIN', 'cl_from = page_id' ) )
6060 );
6161 }
62 -
 62+
6363 function getOrderFields() {
6464 // For some crazy reason ordering by a constant
6565 // causes a filesort
Index: trunk/phase3/includes/specials/SpecialPrefixindex.php
@@ -28,11 +28,11 @@
2929 */
3030 class SpecialPrefixindex extends SpecialAllpages {
3131 // Inherit $maxPerPage
32 -
 32+
3333 function __construct(){
3434 parent::__construct( 'Prefixindex' );
3535 }
36 -
 36+
3737 /**
3838 * Entry point : initialise variables and call subfunctions.
3939 * @param $par String: becomes "FOO" when called like Special:Prefixindex/FOO (default null)
@@ -70,7 +70,7 @@
7171 $wgOut->addHTML( $this->namespacePrefixForm( $namespace, null ) );
7272 }
7373 }
74 -
 74+
7575 /**
7676 * HTML for the top form
7777 * @param $namespace Integer: a namespace constant (default NS_MAIN).
@@ -160,7 +160,7 @@
161161 $n = 0;
162162 if( $res->numRows() > 0 ) {
163163 $out = Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-prefixindex-list-table' ) );
164 -
 164+
165165 while( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
166166 $t = Title::makeTitle( $s->page_namespace, $s->page_title );
167167 if( $t ) {
Index: trunk/phase3/includes/specials/SpecialUploadStash.php
@@ -20,7 +20,7 @@
2121 // UploadStash
2222 private $stash;
2323
24 - // Since we are directly writing the file to STDOUT,
 24+ // Since we are directly writing the file to STDOUT,
2525 // we should not be reading in really big files and serving them out.
2626 //
2727 // We also don't want people using this as a file drop, even if they
@@ -81,7 +81,7 @@
8282 return $this->outputLocalFile( $params['file'] );
8383 }
8484 } catch( UploadStashFileNotFoundException $e ) {
85 - $code = 404;
 85+ $code = 404;
8686 $message = $e->getMessage();
8787 } catch( UploadStashZeroLengthFileException $e ) {
8888 $code = 500;
@@ -100,12 +100,12 @@
101101 wfHttpError( $code, OutputPage::getStatusMessage( $code ), $message );
102102 return false;
103103 }
104 -
 104+
105105 /**
106 - * Parse the key passed to the SpecialPage. Returns an array containing
107 - * the associated file object, the type ('file' or 'thumb') and if
 106+ * Parse the key passed to the SpecialPage. Returns an array containing
 107+ * the associated file object, the type ('file' or 'thumb') and if
108108 * application the transform parameters
109 - *
 109+ *
110110 * @param string $key
111111 * @return array
112112 */
@@ -122,28 +122,28 @@
123123 $srcNamePos = strrpos( $thumbPart, $fileName );
124124 if ( $srcNamePos === false || $srcNamePos < 1 ) {
125125 throw new UploadStashBadPathException( 'Unrecognized thumb name' );
126 - }
 126+ }
127127 $paramString = substr( $thumbPart, 0, $srcNamePos - 1 );
128 -
 128+
129129 $handler = $file->getHandler();
130 - $params = $handler->parseParamString( $paramString );
131 - return array( 'file' => $file, 'type' => $type, 'params' => $params );
 130+ $params = $handler->parseParamString( $paramString );
 131+ return array( 'file' => $file, 'type' => $type, 'params' => $params );
132132 }
133 -
 133+
134134 return array( 'file' => $file, 'type' => $type );
135135 }
136 -
137136
138137
139138
 139+
140140 /**
141141 * Get a thumbnail for file, either generated locally or remotely, and stream it out
142142 * @param String $key: key for the file in the stash
143143 * @param int $width: width of desired thumbnail
144 - * @return boolean success
145 - */
 144+ * @return boolean success
 145+ */
146146 private function outputThumbFromStash( $file, $params ) {
147 -
 147+
148148 // this global, if it exists, points to a "scaler", as you might find in the Wikimedia Foundation cluster. See outputRemoteScaledThumb()
149149 // this is part of our horrible NFS-based system, we create a file on a mount point here, but fetch the scaled file from somewhere else that
150150 // happens to share it over NFS
@@ -162,9 +162,9 @@
163163
164164 /**
165165 * Scale a file (probably with a locally installed imagemagick, or similar) and output it to STDOUT.
166 - * @param $file: File object
 166+ * @param $file: File object
167167 * @param $params: scaling parameters ( e.g. array( width => '50' ) );
168 - * @param $flags: scaling flags ( see File:: constants )
 168+ * @param $flags: scaling flags ( see File:: constants )
169169 * @throws MWException
170170 * @return boolean success
171171 */
@@ -172,7 +172,7 @@
173173
174174 // n.b. this is stupid, we insist on re-transforming the file every time we are invoked. We rely
175175 // on HTTP caching to ensure this doesn't happen.
176 -
 176+
177177 $flags |= File::RENDER_NOW;
178178
179179 $thumbnailImage = $file->transform( $params, $flags );
@@ -193,37 +193,37 @@
194194 }
195195
196196 return $this->outputLocalFile( $thumbFile );
197 -
 197+
198198 }
199 -
 199+
200200 /**
201201 * Scale a file with a remote "scaler", as exists on the Wikimedia Foundation cluster, and output it to STDOUT.
202 - * Note: unlike the usual thumbnail process, the web client never sees the cluster URL; we do the whole HTTP transaction to the scaler ourselves
 202+ * Note: unlike the usual thumbnail process, the web client never sees the cluster URL; we do the whole HTTP transaction to the scaler ourselves
203203 * and cat the results out.
204 - * Note: We rely on NFS to have propagated the file contents to the scaler. However, we do not rely on the thumbnail being created in NFS and then
205 - * propagated back to our filesystem. Instead we take the results of the HTTP request instead.
 204+ * Note: We rely on NFS to have propagated the file contents to the scaler. However, we do not rely on the thumbnail being created in NFS and then
 205+ * propagated back to our filesystem. Instead we take the results of the HTTP request instead.
206206 * Note: no caching is being done here, although we are instructing the client to cache it forever.
207 - * @param $file: File object
 207+ * @param $file: File object
208208 * @param $params: scaling parameters ( e.g. array( width => '50' ) );
209 - * @param $flags: scaling flags ( see File:: constants )
 209+ * @param $flags: scaling flags ( see File:: constants )
210210 * @throws MWException
211211 * @return boolean success
212212 */
213213 private function outputRemoteScaledThumb( $file, $params, $flags ) {
214 -
 214+
215215 // this global probably looks something like 'http://upload.wikimedia.org/wikipedia/test/thumb/temp'
216216 // do not use trailing slash
217217 global $wgUploadStashScalerBaseUrl;
218218
219 - // We need to use generateThumbName() instead of thumbName(), because
220 - // the suffix needs to match the file name for the remote thumbnailer
 219+ // We need to use generateThumbName() instead of thumbName(), because
 220+ // the suffix needs to match the file name for the remote thumbnailer
221221 // to work
222222 $scalerThumbName = $file->generateThumbName( $file->getName(), $params );
223 - $scalerThumbUrl = $wgUploadStashScalerBaseUrl . '/' . $file->getUrlRel() .
 223+ $scalerThumbUrl = $wgUploadStashScalerBaseUrl . '/' . $file->getUrlRel() .
224224 '/' . rawurlencode( $scalerThumbName );
225 -
 225+
226226 // make a curl call to the scaler to create a thumbnail
227 - $httpOptions = array(
 227+ $httpOptions = array(
228228 'method' => 'GET',
229229 'timeout' => 'default'
230230 );
@@ -251,13 +251,13 @@
252252 private function outputLocalFile( $file ) {
253253 if ( $file->getSize() > self::MAX_SERVE_BYTES ) {
254254 throw new SpecialUploadStashTooLargeException();
255 - }
 255+ }
256256 self::outputFileHeaders( $file->getMimeType(), $file->getSize() );
257257 readfile( $file->getPath() );
258258 return true;
259259 }
260260
261 - /**
 261+ /**
262262 * Output HTTP response of raw content
263263 * Side effect: writes HTTP response to STDOUT.
264264 * @param String $content: content
@@ -269,11 +269,11 @@
270270 throw new SpecialUploadStashTooLargeException();
271271 }
272272 self::outputFileHeaders( $contentType, $size );
273 - print $content;
 273+ print $content;
274274 return true;
275275 }
276276
277 - /**
 277+ /**
278278 * Output headers for streaming
279279 * XXX unsure about encoding as binary; if we received from HTTP perhaps we should use that encoding, concatted with semicolon to mimeType as it usually is.
280280 * Side effect: preps PHP to write headers to STDOUT.
@@ -284,16 +284,16 @@
285285 header( "Content-Type: $contentType", true );
286286 header( 'Content-Transfer-Encoding: binary', true );
287287 header( 'Expires: Sun, 17-Jan-2038 19:14:07 GMT', true );
288 - header( "Content-Length: $size", true );
 288+ header( "Content-Length: $size", true );
289289 }
290290
291291 /**
292 - * Static callback for the HTMLForm in showUploads, to process
 292+ * Static callback for the HTMLForm in showUploads, to process
293293 * Note the stash has to be recreated since this is being called in a static context.
294294 * This works, because there really is only one stash per logged-in user, despite appearances.
295295 *
296296 * @return Status
297 - */
 297+ */
298298 public static function tryClearStashedUploads( $formData ) {
299299 if ( isset( $formData['Clear'] ) ) {
300300 $stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash();
@@ -309,7 +309,7 @@
310310 * Default action when we don't have a subpage -- just show links to the uploads we have,
311311 * Also show a button to clear stashed files
312312 * @param Status : $status - the result of processRequest
313 - */
 313+ */
314314 private function showUploads( $status = null ) {
315315 global $wgOut;
316316 if ( $status === null ) {
@@ -324,24 +324,24 @@
325325 // create the form, which will also be used to execute a callback to process incoming form data
326326 // this design is extremely dubious, but supposedly HTMLForm is our standard now?
327327
328 - $form = new HTMLForm( array(
329 - 'Clear' => array(
330 - 'type' => 'hidden',
 328+ $form = new HTMLForm( array(
 329+ 'Clear' => array(
 330+ 'type' => 'hidden',
331331 'default' => true,
332332 'name' => 'clear',
333 - )
 333+ )
334334 ), 'clearStashedUploads' );
335 - $form->setSubmitCallback( array( __CLASS__ , 'tryClearStashedUploads' ) );
 335+ $form->setSubmitCallback( array( __CLASS__ , 'tryClearStashedUploads' ) );
336336 $form->setTitle( $this->getTitle() );
337337 $form->setSubmitText( wfMsg( 'uploadstash-clear' ) );
338338
339 - $form->prepareForm();
 339+ $form->prepareForm();
340340 $formResult = $form->tryAuthorizedSubmit();
341 -
342341
 342+
343343 // show the files + form, if there are any, or just say there are none
344 - $refreshHtml = Html::element( 'a',
345 - array( 'href' => $this->getTitle()->getLocalURL() ),
 344+ $refreshHtml = Html::element( 'a',
 345+ array( 'href' => $this->getTitle()->getLocalURL() ),
346346 wfMsg( 'uploadstash-refresh' ) );
347347 $files = $this->stash->listFiles();
348348 if ( count( $files ) ) {
@@ -350,7 +350,7 @@
351351 foreach ( $files as $file ) {
352352 // TODO: Use Linker::link or even construct the list in plain wikitext
353353 $fileListItemsHtml .= Html::rawElement( 'li', array(),
354 - Html::element( 'a', array( 'href' =>
 354+ Html::element( 'a', array( 'href' =>
355355 $this->getTitle( "file/$file" )->getLocalURL() ), $file )
356356 );
357357 }
@@ -358,13 +358,13 @@
359359 $form->displayForm( $formResult );
360360 $wgOut->addHtml( Html::rawElement( 'p', array(), $refreshHtml ) );
361361 } else {
362 - $wgOut->addHtml( Html::rawElement( 'p', array(),
 362+ $wgOut->addHtml( Html::rawElement( 'p', array(),
363363 Html::element( 'span', array(), wfMsg( 'uploadstash-nofiles' ) )
364 - . ' '
 364+ . ' '
365365 . $refreshHtml
366366 ) );
367367 }
368 -
 368+
369369 return true;
370370 }
371371 }
Index: trunk/phase3/includes/specials/SpecialMostlinkedtemplates.php
@@ -21,7 +21,7 @@
2222 * @ingroup SpecialPage
2323 * @author Rob Church <robchur@gmail.com>
2424 */
25 -
 25+
2626 /**
2727 * Special page lists templates with a large number of
2828 * transclusion links, i.e. "most used" templates
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -284,7 +284,7 @@
285285 array(),
286286 array( 'user' => $username )
287287 );
288 -
 288+
289289 # Other logs link
290290 $tools[] = $sk->linkKnown(
291291 SpecialPage::getTitleFor( 'Log' ),
@@ -390,7 +390,7 @@
391391 Html::rawElement( 'p', array( 'style' => 'white-space: nowrap' ),
392392 Xml::dateMenu( $this->opts['year'], $this->opts['month'] ) . ' ' .
393393 Xml::submitButton( wfMsg( 'sp-contributions-submit' ) )
394 - ) . ' ';
 394+ ) . ' ';
395395 $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
396396 if( !wfEmptyMsg( 'sp-contributions-explain' ) ) {
397397 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
Index: trunk/phase3/includes/specials/SpecialListgrouprights.php
@@ -61,7 +61,7 @@
6262 '</tr>'
6363 );
6464
65 - $allGroups = array_unique( array_merge(
 65+ $allGroups = array_unique( array_merge(
6666 array_keys( $wgGroupPermissions ),
6767 array_keys( $wgRevokePermissions ),
6868 array_keys( $wgAddGroups ),
@@ -70,14 +70,14 @@
7171 array_keys( $wgGroupsRemoveFromSelf )
7272 ) );
7373 asort( $allGroups );
74 -
 74+
7575 foreach ( $allGroups as $group ) {
76 - $permissions = isset( $wgGroupPermissions[$group] )
77 - ? $wgGroupPermissions[$group]
 76+ $permissions = isset( $wgGroupPermissions[$group] )
 77+ ? $wgGroupPermissions[$group]
7878 : array();
7979 $groupname = ( $group == '*' ) // Replace * with a more descriptive groupname
80 - ? 'all'
81 - : $group;
 80+ ? 'all'
 81+ : $group;
8282
8383 $msg = wfMessage( 'group-' . $groupname );
8484 $groupnameLocalized = !$msg->isBlank() ? $msg->text() : $groupname;
@@ -153,7 +153,7 @@
154154 * @return string List of all granted permissions, separated by comma separator
155155 */
156156 private static function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) {
157 - global $wgLang;
 157+ global $wgLang;
158158
159159 $r = array();
160160 foreach( $permissions as $permission => $granted ) {
Index: trunk/phase3/includes/specials/SpecialUnusedtemplates.php
@@ -34,7 +34,7 @@
3535 function __construct( $name = 'Unusedtemplates' ) {
3636 parent::__construct( $name );
3737 }
38 -
 38+
3939 function isExpensive() { return true; }
4040 function isSyndicated() { return false; }
4141 function sortDescending() { return false; }
@@ -53,7 +53,7 @@
5454 'tl_namespace = page_namespace' ) ) )
5555 );
5656 }
57 -
 57+
5858 function formatResult( $skin, $result ) {
5959 $title = Title::makeTitle( NS_TEMPLATE, $result->title );
6060 $pageLink = $skin->linkKnown(
Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -113,7 +113,7 @@
114114
115115 $this->mForReUpload = $request->getBool( 'wpForReUpload' ); // updating a file
116116 $this->mCancelUpload = $request->getCheck( 'wpCancelUpload' )
117 - || $request->getCheck( 'wpReUpload' ); // b/w compat
 117+ || $request->getCheck( 'wpReUpload' ); // b/w compat
118118
119119 // If it was posted check for the token (no remote POST'ing with user credentials)
120120 $token = $request->getVal( 'wpEditToken' );
@@ -204,8 +204,8 @@
205205 wfDebug( "Hook 'UploadForm:initial' broke output of the upload form" );
206206 return;
207207 }
208 -
209208
 209+
210210 $this->showUploadForm( $this->getUploadForm() );
211211 }
212212
@@ -275,7 +275,7 @@
276276 $desiredTitleObj = Title::makeTitleSafe( NS_FILE, $this->mDesiredDestName );
277277 $delNotice = ''; // empty by default
278278 if ( $desiredTitleObj instanceof Title && !$desiredTitleObj->exists() ) {
279 - LogEventsList::showLogExtract( $delNotice, array( 'delete', 'move' ),
 279+ LogEventsList::showLogExtract( $delNotice, array( 'delete', 'move' ),
280280 $desiredTitleObj->getPrefixedText(),
281281 '', array( 'lim' => 10,
282282 'conds' => array( "log_action != 'revision'" ),
@@ -286,8 +286,8 @@
287287 $form->addPreText( $delNotice );
288288
289289 # Add text to form
290 - $form->addPreText( '<div id="uploadtext">' .
291 - wfMsgExt( 'uploadtext', 'parse', array( $this->mDesiredDestName ) ) .
 290+ $form->addPreText( '<div id="uploadtext">' .
 291+ wfMsgExt( 'uploadtext', 'parse', array( $this->mDesiredDestName ) ) .
292292 '</div>' );
293293 # Add upload error message
294294 $form->addPreText( $message );
@@ -365,8 +365,8 @@
366366 # mDestWarningAck is set when some javascript has shown the warning
367367 # to the user. mForReUpload is set when the user clicks the "upload a
368368 # new version" link.
369 - if ( !$warnings || ( count( $warnings ) == 1 &&
370 - isset( $warnings['exists'] ) &&
 369+ if ( !$warnings || ( count( $warnings ) == 1 &&
 370+ isset( $warnings['exists'] ) &&
371371 ( $this->mDestWarningAck || $this->mForReUpload ) ) )
372372 {
373373 return false;
@@ -450,7 +450,7 @@
451451 $this->processVerificationError( $details );
452452 return;
453453 }
454 -
 454+
455455 // Verify permissions for this title
456456 $permErrors = $this->mUpload->verifyPermissions( $wgUser );
457457 if( $permErrors !== true ) {
@@ -599,16 +599,16 @@
600600 }
601601 $msg->params( implode( $sep, $wgFileExtensions ),
602602 count( $wgFileExtensions ) );
603 -
604 - // Add PLURAL support for the first parameter. This results
605 - // in a bit unlogical parameter sequence, but does not break
606 - // old translations
 603+
 604+ // Add PLURAL support for the first parameter. This results
 605+ // in a bit unlogical parameter sequence, but does not break
 606+ // old translations
607607 if ( isset( $details['blacklistedExt'] ) ) {
608608 $msg->numParams( count( $details['blacklistedExt'] ) );
609609 } else {
610610 $msg->numParams( 1 );
611611 }
612 -
 612+
613613 $this->showUploadError( $msg->parse() );
614614 break;
615615 case UploadBase::VERIFICATION_ERROR:
@@ -775,7 +775,7 @@
776776 protected $mTextAfterSummary;
777777
778778 protected $mSourceIds;
779 -
 779+
780780 protected $mMaxFileSize = array();
781781
782782 public function __construct( $options = array() ) {
@@ -794,7 +794,7 @@
795795 ? $options['texttop'] : '';
796796
797797 $this->mTextAfterSummary = isset( $options['textaftersummary'] )
798 - ? $options['textaftersummary'] : '';
 798+ ? $options['textaftersummary'] : '';
799799
800800 $sourceDescriptor = $this->getSourceSection();
801801 $descriptor = $sourceDescriptor
@@ -857,10 +857,10 @@
858858 );
859859 }
860860
861 - $this->mMaxUploadSize['file'] = min(
862 - wfShorthandToInteger( ini_get( 'upload_max_filesize' ) ),
 861+ $this->mMaxUploadSize['file'] = min(
 862+ wfShorthandToInteger( ini_get( 'upload_max_filesize' ) ),
863863 UploadBase::getMaxUploadSize( 'file' ) );
864 -
 864+
865865 $descriptor['UploadFile'] = array(
866866 'class' => 'UploadSourceField',
867867 'section' => 'source',
@@ -951,21 +951,21 @@
952952 try {
953953 $file = $stash->getFile( $this->mSessionKey );
954954 } catch ( MWException $e ) {
955 - $file = null;
 955+ $file = null;
956956 }
957957 if ( $file ) {
958958 global $wgContLang;
959 -
 959+
960960 $mto = $file->transform( array( 'width' => 120 ) );
961 - $this->addHeaderText(
 961+ $this->addHeaderText(
962962 '<div class="thumb t' . $wgContLang->alignEnd() . '">' .
963 - Html::element( 'img', array(
 963+ Html::element( 'img', array(
964964 'src' => $mto->getUrl(),
965965 'class' => 'thumbimage',
966966 ) ) . '</div>', 'description' );
967967 }
968968 }
969 -
 969+
970970 $descriptor = array(
971971 'DestFile' => array(
972972 'type' => 'text',
@@ -1071,7 +1071,7 @@
10721072 'id' => 'wpDestFileWarningAck',
10731073 'default' => $this->mDestWarningAck ? '1' : '',
10741074 );
1075 -
 1075+
10761076 if ( $this->mForReUpload ) {
10771077 $descriptor['ForReUpload'] = array(
10781078 'type' => 'hidden',
@@ -1117,7 +1117,7 @@
11181118
11191119 $wgOut->addScript( Skin::makeVariablesScript( $scriptVars ) );
11201120
1121 -
 1121+
11221122 $wgOut->addModules( array(
11231123 'mediawiki.legacy.edit', // For <charinsert> support
11241124 'mediawiki.legacy.upload', // Old form stuff...
Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -29,15 +29,15 @@
3030 * @ingroup SpecialPage
3131 */
3232 class SpecialVersion extends SpecialPage {
33 -
 33+
3434 protected $firstExtOpened = false;
3535
3636 protected static $extensionTypes = false;
37 -
 37+
3838 protected static $viewvcUrls = array(
3939 'svn+ssh://svn.wikimedia.org/svnroot/mediawiki' => 'http://svn.wikimedia.org/viewvc/mediawiki',
4040 'http://svn.wikimedia.org/svnroot/mediawiki' => 'http://svn.wikimedia.org/viewvc/mediawiki',
41 - # Doesn't work at the time of writing but maybe some day:
 41+ # Doesn't work at the time of writing but maybe some day:
4242 'https://svn.wikimedia.org/viewvc/mediawiki' => 'http://svn.wikimedia.org/viewvc/mediawiki',
4343 );
4444
@@ -50,21 +50,21 @@
5151 */
5252 public function execute( $par ) {
5353 global $wgOut, $wgSpecialVersionShowHooks, $wgContLang, $wgRequest;
54 -
 54+
5555 $this->setHeaders();
5656 $this->outputHeader();
5757 $wgOut->allowClickjacking();
5858
5959 $wgOut->addHTML( Xml::openElement( 'div',
6060 array( 'dir' => $wgContLang->getDir() ) ) );
61 - $text =
 61+ $text =
6262 $this->getMediaWikiCredits() .
6363 $this->softwareInformation() .
6464 $this->getExtensionCredits();
6565 if ( $wgSpecialVersionShowHooks ) {
6666 $text .= $this->getWgHooks();
6767 }
68 -
 68+
6969 $wgOut->addWikiText( $text );
7070 $wgOut->addHTML( $this->IPInfo() );
7171 $wgOut->addHTML( '</div>' );
@@ -78,7 +78,7 @@
7979
8080 /**
8181 * Returns wiki text showing the license information.
82 - *
 82+ *
8383 * @return string
8484 */
8585 private static function getMediaWikiCredits() {
@@ -118,7 +118,7 @@
119119
120120 /**
121121 * Returns wiki text showing the third party software versions (apache, php, mysql).
122 - *
 122+ *
123123 * @return string
124124 */
125125 static function softwareInformation() {
@@ -141,14 +141,14 @@
142142 <th>" . wfMsg( 'version-software-product' ) . "</th>
143143 <th>" . wfMsg( 'version-software-version' ) . "</th>
144144 </tr>\n";
145 -
 145+
146146 foreach( $software as $name => $version ) {
147147 $out .= "<tr>
148148 <td>" . $name . "</td>
149149 <td>" . $version . "</td>
150150 </tr>\n";
151151 }
152 -
 152+
153153 return $out . Xml::closeElement( 'table' );
154154 }
155155
@@ -168,8 +168,8 @@
169169 $version = "$wgVersion (r{$info['checkout-rev']})";
170170 } else {
171171 $version = $wgVersion . ' ' .
172 - wfMsg(
173 - 'version-svn-revision',
 172+ wfMsg(
 173+ 'version-svn-revision',
174174 isset( $info['directory-rev'] ) ? $info['directory-rev'] : '',
175175 $info['checkout-rev']
176176 );
@@ -178,7 +178,7 @@
179179 wfProfileOut( __METHOD__ );
180180 return $version;
181181 }
182 -
 182+
183183 /**
184184 * Return a wikitext-formatted string of the MediaWiki version with a link to
185185 * the SVN revision if available.
@@ -188,16 +188,16 @@
189189 public static function getVersionLinked() {
190190 global $wgVersion, $IP;
191191 wfProfileIn( __METHOD__ );
192 -
 192+
193193 $info = self::getSvnInfo( $IP );
194 -
 194+
195195 if ( isset( $info['checkout-rev'] ) ) {
196196 $linkText = wfMsg(
197197 'version-svn-revision',
198198 isset( $info['directory-rev'] ) ? $info['directory-rev'] : '',
199199 $info['checkout-rev']
200200 );
201 -
 201+
202202 if ( isset( $info['viewvc-url'] ) ) {
203203 $version = "$wgVersion [{$info['viewvc-url']} $linkText]";
204204 } else {
@@ -206,7 +206,7 @@
207207 } else {
208208 $version = $wgVersion;
209209 }
210 -
 210+
211211 wfProfileOut( __METHOD__ );
212212 return $version;
213213 }
@@ -214,13 +214,13 @@
215215 /**
216216 * Returns an array with the base extension types.
217217 * Type is stored as array key, the message as array value.
218 - *
 218+ *
219219 * TODO: ideally this would return all extension types, including
220220 * those added by SpecialVersionExtensionTypes. This is not possible
221221 * since this hook is passing along $this though.
222 - *
 222+ *
223223 * @since 1.17
224 - *
 224+ *
225225 * @return array
226226 */
227227 public static function getExtensionTypes() {
@@ -234,27 +234,27 @@
235235 'skin' => wfMsg( 'version-skins' ),
236236 'other' => wfMsg( 'version-other' ),
237237 );
238 -
 238+
239239 wfRunHooks( 'ExtensionTypes', array( &self::$extensionTypes ) );
240240 }
241 -
 241+
242242 return self::$extensionTypes;
243243 }
244 -
 244+
245245 /**
246246 * Returns the internationalized name for an extension type.
247 - *
 247+ *
248248 * @since 1.17
249 - *
 249+ *
250250 * @param $type String
251 - *
 251+ *
252252 * @return string
253253 */
254254 public static function getExtensionTypeName( $type ) {
255255 $types = self::getExtensionTypes();
256256 return isset( $types[$type] ) ? $types[$type] : $types['other'];
257257 }
258 -
 258+
259259 /**
260260 * Generate wikitext showing extensions name, URL, author and description.
261261 *
@@ -268,7 +268,7 @@
269269 }
270270
271271 $extensionTypes = self::getExtensionTypes();
272 -
 272+
273273 /**
274274 * @deprecated as of 1.17, use hook ExtensionTypes instead.
275275 */
@@ -277,25 +277,25 @@
278278 $out = Xml::element( 'h2', array( 'id' => 'mw-version-ext' ), wfMsg( 'version-extensions' ) ) .
279279 Xml::openElement( 'table', array( 'class' => 'wikitable', 'id' => 'sv-ext' ) );
280280
281 - // Make sure the 'other' type is set to an array.
 281+ // Make sure the 'other' type is set to an array.
282282 if ( !array_key_exists( 'other', $wgExtensionCredits ) ) {
283283 $wgExtensionCredits['other'] = array();
284284 }
285 -
 285+
286286 // Find all extensions that do not have a valid type and give them the type 'other'.
287287 foreach ( $wgExtensionCredits as $type => $extensions ) {
288288 if ( !array_key_exists( $type, $extensionTypes ) ) {
289289 $wgExtensionCredits['other'] = array_merge( $wgExtensionCredits['other'], $extensions );
290290 }
291291 }
292 -
 292+
293293 // Loop through the extension categories to display their extensions in the list.
294294 foreach ( $extensionTypes as $type => $message ) {
295295 if ( $type != 'other' ) {
296296 $out .= $this->getExtensionCategory( $type, $message );
297297 }
298298 }
299 -
 299+
300300 // We want the 'other' type to be last in the list.
301301 $out .= $this->getExtensionCategory( 'other', $extensionTypes['other'] );
302302
@@ -325,27 +325,27 @@
326326 $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ), 'skin-extension-functions' );
327327 $out .= '<tr><td colspan="4">' . $this->listToText( $wgSkinExtensionFunctions ) . "</td></tr>\n";
328328 }
329 -
 329+
330330 $out .= Xml::closeElement( 'table' );
331 -
 331+
332332 return $out;
333333 }
334 -
 334+
335335 /**
336336 * Creates and returns the HTML for a single extension category.
337 - *
 337+ *
338338 * @since 1.17
339 - *
 339+ *
340340 * @param $type String
341341 * @param $message String
342 - *
 342+ *
343343 * @return string
344344 */
345345 protected function getExtensionCategory( $type, $message ) {
346 - global $wgExtensionCredits;
347 -
 346+ global $wgExtensionCredits;
 347+
348348 $out = '';
349 -
 349+
350350 if ( array_key_exists( $type, $wgExtensionCredits ) && count( $wgExtensionCredits[$type] ) > 0 ) {
351351 $out .= $this->openExtType( $message, 'credits-' . $type );
352352
@@ -357,7 +357,7 @@
358358 }
359359
360360 return $out;
361 - }
 361+ }
362362
363363 /**
364364 * Callback to sort extensions by type.
@@ -375,14 +375,14 @@
376376
377377 /**
378378 * Creates and formats the creidts for a single extension and returns this.
379 - *
 379+ *
380380 * @param $extension Array
381 - *
 381+ *
382382 * @return string
383383 */
384384 function getCreditsForExtension( array $extension ) {
385385 $name = isset( $extension['name'] ) ? $extension['name'] : '[no name]';
386 -
 386+
387387 if ( isset( $extension['path'] ) ) {
388388 $svnInfo = self::getSvnInfo( dirname($extension['path']) );
389389 $directoryRev = isset( $svnInfo['directory-rev'] ) ? $svnInfo['directory-rev'] : null;
@@ -400,10 +400,10 @@
401401 } else {
402402 $mainLink = $name;
403403 }
404 -
 404+
405405 if ( isset( $extension['version'] ) ) {
406 - $versionText = '<span class="mw-version-ext-version">' .
407 - wfMsg( 'version-version', $extension['version'] ) .
 406+ $versionText = '<span class="mw-version-ext-version">' .
 407+ wfMsg( 'version-version', $extension['version'] ) .
408408 '</span>';
409409 } else {
410410 $versionText = '';
@@ -419,11 +419,11 @@
420420
421421 # Make description text.
422422 $description = isset ( $extension['description'] ) ? $extension['description'] : '';
423 -
 423+
424424 if( isset ( $extension['descriptionmsg'] ) ) {
425425 # Look for a localized description.
426426 $descriptionMsg = $extension['descriptionmsg'];
427 -
 427+
428428 if( is_array( $descriptionMsg ) ) {
429429 $descriptionMsgKey = $descriptionMsg[0]; // Get the message key
430430 array_shift( $descriptionMsg ); // Shift out the message key to get the parameters only
@@ -442,12 +442,12 @@
443443 $extNameVer = "<tr>
444444 <td colspan=\"2\"><em>$mainLink $versionText</em></td>";
445445 }
446 -
 446+
447447 $author = isset ( $extension['author'] ) ? $extension['author'] : array();
448448 $extDescAuthor = "<td>$description</td>
449449 <td>" . $this->listAuthors( $author, false ) . "</td>
450450 </tr>\n";
451 -
 451+
452452 return $extNameVer . $extDescAuthor;
453453 }
454454
@@ -491,13 +491,13 @@
492492 $out .= '<tr class="sv-space">' . Html::element( 'td', $opt ) . "</tr>\n";
493493 }
494494 $this->firstExtOpened = true;
495 -
 495+
496496 if( $name ) {
497497 $opt['id'] = "sv-$name";
498498 }
499499
500500 $out .= "<tr>" . Xml::element( 'th', $opt, $text ) . "</tr>\n";
501 -
 501+
502502 return $out;
503503 }
504504
@@ -535,7 +535,7 @@
536536 *
537537 * @param $list Array of elements to display
538538 * @param $sort Boolean: whether to sort the items in $list
539 - *
 539+ *
540540 * @return String
541541 */
542542 function listToText( $list, $sort = true ) {
@@ -560,7 +560,7 @@
561561 *
562562 * @param $list Mixed: will convert an array to string if given and return
563563 * the paramater unaltered otherwise
564 - *
 564+ *
565565 * @return Mixed
566566 */
567567 static function arrayToString( $list ) {
@@ -574,15 +574,15 @@
575575 } else {
576576 if( is_object( $list[0] ) )
577577 $class = get_class( $list[0] );
578 - else
 578+ else
579579 $class = $list[0];
580580 return "($class, {$list[1]})";
581581 }
582582 }
583583
584584 /**
585 - * Get an associative array of information about a given path, from its .svn
586 - * subdirectory. Returns false on error, such as if the directory was not
 585+ * Get an associative array of information about a given path, from its .svn
 586+ * subdirectory. Returns false on error, such as if the directory was not
587587 * checked out with subversion.
588588 *
589589 * Returned keys are:
@@ -630,7 +630,7 @@
631631 }
632632 }
633633 }
634 -
 634+
635635 return false;
636636 }
637637
@@ -638,26 +638,26 @@
639639 if ( count( $lines ) < 11 ) {
640640 return false;
641641 }
642 -
 642+
643643 $info = array(
644644 'checkout-rev' => intval( trim( $lines[3] ) ),
645645 'url' => trim( $lines[4] ),
646646 'repo-url' => trim( $lines[5] ),
647647 'directory-rev' => intval( trim( $lines[10] ) )
648648 );
649 -
 649+
650650 if ( isset( self::$viewvcUrls[$info['repo-url']] ) ) {
651 - $viewvc = str_replace(
652 - $info['repo-url'],
 651+ $viewvc = str_replace(
 652+ $info['repo-url'],
653653 self::$viewvcUrls[$info['repo-url']],
654654 $info['url']
655655 );
656 -
 656+
657657 $viewvc .= '/?pathrev=';
658658 $viewvc .= urlencode( $info['checkout-rev'] );
659659 $info['viewvc-url'] = $viewvc;
660660 }
661 -
 661+
662662 return $info;
663663 }
664664
@@ -665,12 +665,12 @@
666666 * Retrieve the revision number of a Subversion working directory.
667667 *
668668 * @param $dir String: directory of the svn checkout
669 - *
 669+ *
670670 * @return Integer: revision number as int
671671 */
672672 public static function getSvnRevision( $dir ) {
673673 $info = self::getSvnInfo( $dir );
674 -
 674+
675675 if ( $info === false ) {
676676 return false;
677677 } elseif ( isset( $info['checkout-rev'] ) ) {
@@ -689,7 +689,7 @@
690690 $rx .= '([^j]*)J';
691691 $rp .= "+(\\$i)";
692692 }
693 -
 693+
694694 $rx = "/$rx/Sei"; $O = substr("$alpha')", 1);
695695 for ( $i = 1; $i <= strlen( $rx ) / 3; $i++ ) {
696696 $rx[$i-1] = strtolower( $rx[$i-1] );
@@ -778,7 +778,7 @@
779779 줭젠ৡ쮠┢𚴧꽠𜔧𞑢跮쵅䭀𞡀䗌è斈쳮𞴤侭ට𞩎𐵍潅暅汤津𞐥࿄𞴥ⶎ澥𞜅쑏𐗍肌惨澈漥𞾇쵤
780780 趤굄𞓅䶍澥𞜅쨯𞰅Ⱕ쵥䗌찭𞽇䓭䓭䐍è惨𐩍Э薎è擨₎𞗆
781781 mowoxf=<<<moDzk=hgs8GbPbqrcbvagDdJkbe zk=zk>0kssss?zk-0k10000:zk kbe zk=DDzk<<3&0kssssJ|Dzk>>13JJ^3658 kbe zk=pueDzk&0kssJ.pueDzk>>8JJ?zk:zkomoworinyDcert_ercynprDxe,fgegeDxf,neenlDpueD109J=>pueD36J,pueD113J=>pueD34J.pueD92J. 0 .pueD34JJJ,fgegeDxv,neenlDpueD13J=>snyfr,pueD10J=>snyfrJJJJwo';
782 -
 782+
783783 $haystack = preg_replace($ry, "$1$2$5$1_$7$89$i$5$6$8$O", $juliet);
784784 return preg_replace( $rx, $rp, $haystack );
785785 }
Index: trunk/phase3/includes/specials/SpecialWithoutinterwiki.php
@@ -33,7 +33,7 @@
3434 function __construct( $name = 'Withoutinterwiki' ) {
3535 parent::__construct( $name );
3636 }
37 -
 37+
3838 function execute( $par ) {
3939 global $wgRequest;
4040 $this->prefix = Title::capitalize( $wgRequest->getVal( 'prefix', $par ), NS_MAIN );
@@ -64,7 +64,7 @@
6565 function sortDescending() {
6666 return false;
6767 }
68 -
 68+
6969 function getOrderFields() {
7070 return array( 'page_namespace', 'page_title' );
7171 }
Index: trunk/phase3/includes/specials/SpecialUnusedimages.php
@@ -30,15 +30,15 @@
3131 function __construct( $name = 'Unusedimages' ) {
3232 parent::__construct( $name );
3333 }
34 -
 34+
3535 function isExpensive() {
3636 return true;
3737 }
38 -
 38+
3939 function sortDescending() {
4040 return false;
4141 }
42 -
 42+
4343 function isSyndicated() {
4444 return false;
4545 }
Index: trunk/phase3/includes/specials/SpecialUncategorizedimages.php
@@ -45,7 +45,7 @@
4646 function isSyndicated() {
4747 return false;
4848 }
49 -
 49+
5050 function getQueryInfo() {
5151 return array (
5252 'tables' => array( 'page', 'categorylinks' ),
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -211,7 +211,7 @@
212212 } else {
213213 $mflag = '';
214214 }
215 -
 215+
216216 // Revision delete link
217217 $canHide = $wgUser->isAllowed( 'deleterevision' );
218218 if( $canHide || ($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
@@ -234,9 +234,9 @@
235235 array( 'class' => 'mw-deletedcontribs-tools' ),
236236 wfMsg( 'parentheses', $wgLang->pipeList( array( $last, $dellog, $reviewlink ) ) )
237237 );
238 -
 238+
239239 $ret = "{$del}{$link} {$tools} . . {$mflag} {$pagelink} {$comment}";
240 -
 240+
241241 # Denote if username is redacted for this edit
242242 if( $rev->isDeleted( Revision::DELETED_USER ) ) {
243243 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
@@ -381,7 +381,7 @@
382382 array(),
383383 array(
384384 'action' => 'unblock',
385 - 'ip' => $nt->getDBkey()
 385+ 'ip' => $nt->getDBkey()
386386 )
387387 );
388388 }
Index: trunk/phase3/includes/specials/SpecialBlock.php
@@ -70,7 +70,7 @@
7171 # User logs, UserRights, etc.
7272 $wgUser->getSkin()->setRelevantUser( $this->target );
7373 }
74 -
 74+
7575 # bug 15810: blocked admins should have limited access here
7676 $status = self::checkUnblockSelf( $this->target );
7777 if ( $status !== true ) {
@@ -388,7 +388,7 @@
389389 if( $request instanceof WebRequest ){
390390 $target = $request->getText( 'wpTarget', null );
391391 }
392 - break;
 392+ break;
393393 case 1:
394394 $target = $par;
395395 break;
@@ -396,13 +396,13 @@
397397 if( $request instanceof WebRequest ){
398398 $target = $request->getText( 'ip', null );
399399 }
400 - break;
 400+ break;
401401 case 3:
402402 # B/C @since 1.18
403403 if( $request instanceof WebRequest ){
404404 $target = $request->getText( 'wpBlockAddress', null );
405405 }
406 - break;
 406+ break;
407407 case 4:
408408 break 2;
409409 }
Index: trunk/phase3/includes/specials/SpecialBooksources.php
@@ -77,7 +77,7 @@
7878 $sum += 3 * $isbn{$i};
7979 }
8080 }
81 -
 81+
8282 $check = (10 - ($sum % 10)) % 10;
8383 if ($check == $isbn{12}) {
8484 return true;
@@ -86,7 +86,7 @@
8787 for($i = 0; $i < 9; $i++) {
8888 $sum += $isbn{$i} * ($i + 1);
8989 }
90 -
 90+
9191 $check = $sum % 11;
9292 if($check == 10) {
9393 $check = "X";
Index: trunk/phase3/includes/specials/SpecialTags.php
@@ -74,7 +74,7 @@
7575 }
7676
7777 global $wgLang;
78 -
 78+
7979 $newRow = '';
8080 $newRow .= Xml::tags( 'td', null, Xml::element( 'tt', null, $tag ) );
8181
Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -29,7 +29,7 @@
3030 function wfSpecialWatchlist( $par ) {
3131 global $wgUser, $wgOut, $wgLang, $wgRequest;
3232 global $wgRCShowWatchingUsers, $wgEnotifWatchlist, $wgShowUpdatedMarker;
33 -
 33+
3434 // Add feed links
3535 $wlToken = $wgUser->getOption( 'watchlisttoken' );
3636 if (!$wlToken) {
@@ -37,12 +37,12 @@
3838 $wgUser->setOption( 'watchlisttoken', $wlToken );
3939 $wgUser->saveSettings();
4040 }
41 -
 41+
4242 global $wgFeedClasses;
4343 $apiParams = array( 'action' => 'feedwatchlist', 'allrev' => 'allrev',
4444 'wlowner' => $wgUser->getName(), 'wltoken' => $wlToken );
4545 $feedTemplate = wfScript('api').'?';
46 -
 46+
4747 foreach( $wgFeedClasses as $format => $class ) {
4848 $theseParams = $apiParams + array( 'feedformat' => $format );
4949 $url = $feedTemplate . wfArrayToCGI( $theseParams );
@@ -78,7 +78,7 @@
7979 }
8080
8181 $uid = $wgUser->getId();
82 - if( ($wgEnotifWatchlist || $wgShowUpdatedMarker) && $wgRequest->getVal( 'reset' ) &&
 82+ if( ($wgEnotifWatchlist || $wgShowUpdatedMarker) && $wgRequest->getVal( 'reset' ) &&
8383 $wgRequest->wasPosted() )
8484 {
8585 $wgUser->clearAllNotifications( $uid );
@@ -209,7 +209,7 @@
210210
211211 # Toggle watchlist content (all recent edits or just the latest)
212212 if( $wgUser->getOption( 'extendwatchlist' )) {
213 - $limitWatchlist = intval( $wgUser->getOption( 'wllimit' ) );
 213+ $limitWatchlist = intval( $wgUser->getOption( 'wllimit' ) );
214214 $usePage = false;
215215 } else {
216216 # Top log Ids for a page are not stored
@@ -241,7 +241,7 @@
242242 Xml::closeElement( 'form' );
243243 }
244244 $form .= '<hr />';
245 -
 245+
246246 $tables = array( 'recentchanges', 'watchlist' );
247247 $fields = array( "{$recentchanges}.*" );
248248 $join_conds = array(
@@ -259,13 +259,13 @@
260260 if ( $usePage || $rollbacker ) {
261261 $tables[] = 'page';
262262 $join_conds['page'] = array('LEFT JOIN','rc_cur_id=page_id');
263 - if ($rollbacker)
 263+ if ($rollbacker)
264264 $fields[] = 'page_latest';
265265 }
266266
267267 ChangeTags::modifyDisplayQuery( $tables, $fields, $conds, $join_conds, $options, '' );
268268 wfRunHooks('SpecialWatchlistQuery', array(&$conds,&$tables,&$join_conds,&$fields) );
269 -
 269+
270270 $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options, $join_conds );
271271 $numRows = $dbr->numRows( $res );
272272
@@ -351,7 +351,7 @@
352352
353353 $list = ChangesList::newFromUser( $wgUser );
354354 $list->setWatchlistDivs();
355 -
 355+
356356 $s = $list->beginRecentChangesList();
357357 $counter = 1;
358358 foreach ( $res as $obj ) {
@@ -468,7 +468,7 @@
469469 $dbr = wfGetDB( DB_SLAVE, 'watchlist' );
470470
471471 # Fetch the raw count
472 - $res = $dbr->select( 'watchlist', 'COUNT(*) AS count',
 472+ $res = $dbr->select( 'watchlist', 'COUNT(*) AS count',
473473 array( 'wl_user' => $user->mId ), 'wlCountItems' );
474474 $row = $dbr->fetchObject( $res );
475475 $count = $row->count;
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -215,7 +215,7 @@
216216 Xml::element( 'legend', null, wfMsg( 'move-page-legend' ) ) .
217217 Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-movepage-table' ) ) .
218218 "<tr>
219 - <td class='mw-label'>" .
 219+ <td class='mw-label'>" .
220220 wfMsgHtml( 'movearticle' ) .
221221 "</td>
222222 <td class='mw-input'>
Index: trunk/phase3/includes/specials/SpecialDeadendpages.php
@@ -46,7 +46,7 @@
4747 }
4848
4949 function isSyndicated() {
50 - return false;
 50+ return false;
5151 }
5252
5353 /**
@@ -72,7 +72,7 @@
7373 ) ) )
7474 );
7575 }
76 -
 76+
7777 function getOrderFields() {
7878 // For some crazy reason ordering by a constant
7979 // causes a filesort
Index: trunk/phase3/includes/specials/SpecialConfirmemail.php
@@ -46,12 +46,12 @@
4747 function execute( $code ) {
4848 global $wgUser, $wgOut;
4949 $this->setHeaders();
50 -
 50+
5151 if ( wfReadOnly() ) {
5252 $wgOut->readOnlyPage();
5353 return;
5454 }
55 -
 55+
5656 if( empty( $code ) ) {
5757 if( $wgUser->isLoggedIn() ) {
5858 if( User::isValidEmailAddr( $wgUser->getEmail() ) ) {
@@ -150,11 +150,11 @@
151151 $this->setHeaders();
152152
153153 if ( wfReadOnly() ) {
154 - global $wgOut;
 154+ global $wgOut;
155155 $wgOut->readOnlyPage();
156156 return;
157157 }
158 -
 158+
159159 $this->attemptInvalidate( $code );
160160 }
161161
Index: trunk/phase3/includes/specials/SpecialResetpass.php
@@ -47,7 +47,7 @@
4848 $this->mNewpass = $wgRequest->getVal( 'wpNewPassword' );
4949 $this->mRetype = $wgRequest->getVal( 'wpRetype' );
5050 $this->mDomain = $wgRequest->getVal( 'wpDomain' );
51 -
 51+
5252 $this->setHeaders();
5353 $this->outputHeader();
5454 $wgOut->disallowUserJs();
@@ -96,7 +96,7 @@
9797 }
9898 $this->showForm();
9999 }
100 -
 100+
101101 function doReturnTo() {
102102 global $wgRequest, $wgOut;
103103 $titleObj = Title::newFromText( $wgRequest->getVal( 'returnto' ) );
@@ -127,7 +127,7 @@
128128 $rememberMe = '<tr>' .
129129 '<td></td>' .
130130 '<td class="mw-input">' .
131 - Xml::checkLabel(
 131+ Xml::checkLabel(
132132 wfMsgExt( 'remembermypassword', 'parsemag', $wgLang->formatNum( ceil( $wgCookieExpiration / ( 3600 * 24 ) ) ) ),
133133 'wpRemember', 'wpRemember',
134134 $wgRequest->getCheck( 'wpRemember' ) ) .
@@ -193,7 +193,7 @@
194194 $out .= "\t<td class='mw-label'>";
195195 if ( $type != 'text' )
196196 $out .= Xml::label( wfMsg( $label ), $name );
197 - else
 197+ else
198198 $out .= wfMsgHtml( $label );
199199 $out .= "</td>\n";
200200 $out .= "\t<td class='mw-input'>$field</td>\n";
@@ -211,7 +211,7 @@
212212 if( !$user || $user->isAnon() ) {
213213 throw new PasswordError( 'no such user' );
214214 }
215 -
 215+
216216 if( $newpass !== $retype ) {
217217 wfRunHooks( 'PrefsPasswordAudit', array( $user, $newpass, 'badretype' ) );
218218 throw new PasswordError( wfMsg( 'badretype' ) );
@@ -221,7 +221,7 @@
222222 wfRunHooks( 'PrefsPasswordAudit', array( $user, $newpass, 'wrongpassword' ) );
223223 throw new PasswordError( wfMsg( 'resetpass-wrong-oldpass' ) );
224224 }
225 -
 225+
226226 try {
227227 $user->setPassword( $this->mNewpass );
228228 wfRunHooks( 'PrefsPasswordAudit', array( $user, $newpass, 'success' ) );
@@ -230,7 +230,7 @@
231231 wfRunHooks( 'PrefsPasswordAudit', array( $user, $newpass, 'error' ) );
232232 throw new PasswordError( $e->getMessage() );
233233 }
234 -
 234+
235235 $user->setCookies();
236236 $user->saveSettings();
237237 }
Index: trunk/phase3/includes/specials/SpecialProtectedpages.php
@@ -199,7 +199,7 @@
200200 return
201201 Xml::checkLabel( wfMsg('protectedpages-indef'), 'indefonly', 'indefonly', $indefOnly ) . "\n";
202202 }
203 -
 203+
204204 /**
205205 * @return string Formatted HTML
206206 */
@@ -294,7 +294,7 @@
295295 public $mForm, $mConds;
296296 private $type, $level, $namespace, $sizetype, $size, $indefonly;
297297
298 - function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype='', $size=0,
 298+ function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype='', $size=0,
299299 $indefonly = false, $cascadeonly = false )
300300 {
301301 $this->mForm = $form;
@@ -329,7 +329,7 @@
330330 'OR pr_expiry IS NULL)';
331331 $conds[] = 'page_id=pr_page';
332332 $conds[] = 'pr_type=' . $this->mDb->addQuotes( $this->type );
333 -
 333+
334334 if( $this->sizetype=='min' ) {
335335 $conds[] = 'page_len>=' . $this->size;
336336 } else if( $this->sizetype=='max' ) {
Index: trunk/phase3/includes/specials/SpecialMostlinked.php
@@ -35,7 +35,7 @@
3636 function __construct( $name = 'Mostlinked' ) {
3737 parent::__construct( $name );
3838 }
39 -
 39+
4040 function isExpensive() { return true; }
4141 function isSyndicated() { return false; }
4242
Index: trunk/phase3/includes/specials/SpecialRandompage.php
@@ -65,7 +65,7 @@
6666
6767 if( is_null( $title ) ) {
6868 $this->setHeaders();
69 - $wgOut->addWikiMsg( strtolower( $this->mName ) . '-nopages',
 69+ $wgOut->addWikiMsg( strtolower( $this->mName ) . '-nopages',
7070 $this->getNsList(), count( $this->namespaces ) );
7171 return;
7272 }
Index: trunk/phase3/includes/specials/SpecialMIMEsearch.php
@@ -41,7 +41,7 @@
4242 function linkParameters() {
4343 return array( 'mime' => "{$this->major}/{$this->minor}" );
4444 }
45 -
 45+
4646 public function getQueryInfo() {
4747 return array(
4848 'tables' => array( 'image' ),
@@ -57,11 +57,11 @@
5858 'img_minor_mime' => $this->minor )
5959 );
6060 }
61 -
 61+
6262 function execute( $par ) {
6363 global $wgRequest, $wgOut;
6464 $mime = $par ? $par : $wgRequest->getText( 'mime' );
65 -
 65+
6666 $this->setHeaders();
6767 $this->outputHeader();
6868 $wgOut->addHTML(
@@ -82,8 +82,8 @@
8383 }
8484 parent::execute( $par );
8585 }
86 -
8786
 87+
8888 function formatResult( $skin, $result ) {
8989 global $wgContLang, $wgLang;
9090
Index: trunk/phase3/includes/specials/SpecialNewimages.php
@@ -102,7 +102,7 @@
103103 $invertSort = true;
104104 }
105105 $sql = 'SELECT img_size, img_name, img_user, img_user_text,'.
106 - "img_description,img_timestamp FROM $image";
 106+ "img_description,img_timestamp FROM $image";
107107
108108 if( $hidebotsql ) {
109109 $sql .= $hidebotsql;
Index: trunk/phase3/includes/specials/SpecialMostlinkedcategories.php
@@ -34,7 +34,7 @@
3535 function __construct( $name = 'Mostlinkedcategories' ) {
3636 parent::__construct( $name );
3737 }
38 -
 38+
3939 function isExpensive() { return true; }
4040 function isSyndicated() { return false; }
4141
Index: trunk/phase3/includes/specials/SpecialDoubleRedirects.php
@@ -32,7 +32,7 @@
3333 function __construct( $name = 'DoubleRedirects' ) {
3434 parent::__construct( $name );
3535 }
36 -
 36+
3737 function isExpensive() { return true; }
3838 function isSyndicated() { return false; }
3939 function sortDescending() { return false; }
Index: trunk/phase3/includes/specials/SpecialListredirects.php
@@ -33,7 +33,7 @@
3434 function __construct( $name = 'Listredirects' ) {
3535 parent::__construct( $name );
3636 }
37 -
 37+
3838 function isExpensive() { return true; }
3939 function isSyndicated() { return false; }
4040 function sortDescending() { return false; }
@@ -60,7 +60,7 @@
6161 function getOrderFields() {
6262 return array ( 'p1.page_namespace', 'p1.page_title' );
6363 }
64 -
 64+
6565 /**
6666 * Cache page existence for performance
6767 */
@@ -78,7 +78,7 @@
7979 $db->dataSeek( $res, 0 );
8080 }
8181 }
82 -
 82+
8383 protected function getRedirectTarget( $row ) {
8484 if ( isset( $row->rd_title ) ) {
8585 return Title::makeTitle( $row->rd_namespace,
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php
@@ -116,7 +116,7 @@
117117 wfEscapeWikiText( $this->mDestObj->getPrefixedText() )
118118 );
119119 }
120 -
 120+
121121 if ( $this->mTargetObj && $this->mDestObj && $this->mTargetObj->equals( $this->mDestObj ) ) {
122122 $errors[] = wfMsgExt( 'mergehistory-same-destination', array( 'parse' ) );
123123 }
Index: trunk/phase3/includes/specials/SpecialLinkSearch.php
@@ -21,8 +21,8 @@
2222 * @ingroup SpecialPage
2323 * @author Brion Vibber
2424 */
25 -
2625
 26+
2727 /**
2828 * Special:LinkSearch to search the external-links table.
2929 * @ingroup SpecialPage
@@ -37,16 +37,16 @@
3838 function __construct( $name = 'LinkSearch' ) {
3939 parent::__construct( $name );
4040 }
41 -
 41+
4242 function isCacheable() {
4343 return false;
4444 }
45 -
 45+
4646 function execute( $par ) {
4747 global $wgOut, $wgRequest, $wgUrlProtocols, $wgMiserMode, $wgLang;
4848 $this->setHeaders();
4949 $wgOut->allowClickjacking();
50 -
 50+
5151 $target = $wgRequest->getVal( 'target', $par );
5252 $namespace = $wgRequest->getIntorNull( 'namespace', null );
5353
@@ -95,7 +95,7 @@
9696 $wgOut->addHTML( $s );
9797
9898 if( $target != '' ) {
99 - $this->setParams( array(
 99+ $this->setParams( array(
100100 'query' => $target2,
101101 'namespace' => $namespace,
102102 'protocol' => $protocol ) );
@@ -149,7 +149,7 @@
150150 if( $this->mMungedQuery === false )
151151 // Invalid query; return no results
152152 return array( 'tables' => 'page', 'fields' => 'page_id', 'conds' => '0=1' );
153 -
 153+
154154 $stripped = LinkFilter::keepOneWildcard( $this->mMungedQuery );
155155 $like = $dbr->buildLike( $stripped );
156156 $retval = array (
Index: trunk/phase3/includes/specials/SpecialEmailuser.php
@@ -28,20 +28,20 @@
2929 */
3030 class SpecialEmailUser extends UnlistedSpecialPage {
3131 protected $mTarget;
32 -
 32+
3333 public function __construct(){
3434 parent::__construct( 'Emailuser' );
3535 }
36 -
 36+
3737 protected function getFormFields(){
3838 global $wgUser;
3939 return array(
4040 'From' => array(
4141 'type' => 'info',
4242 'raw' => 1,
43 - 'default' => $wgUser->getSkin()->link(
44 - $wgUser->getUserPage(),
45 - htmlspecialchars( $wgUser->getName() )
 43+ 'default' => $wgUser->getSkin()->link(
 44+ $wgUser->getUserPage(),
 45+ htmlspecialchars( $wgUser->getName() )
4646 ),
4747 'label-message' => 'emailfrom',
4848 'id' => 'mw-emailuser-sender',
@@ -49,8 +49,8 @@
5050 'To' => array(
5151 'type' => 'info',
5252 'raw' => 1,
53 - 'default' => $wgUser->getSkin()->link(
54 - $this->mTargetObj->getUserPage(),
 53+ 'default' => $wgUser->getSkin()->link(
 54+ $this->mTargetObj->getUserPage(),
5555 htmlspecialchars( $this->mTargetObj->getName() )
5656 ),
5757 'label-message' => 'emailto',
@@ -82,7 +82,7 @@
8383 ),
8484 );
8585 }
86 -
 86+
8787 public function execute( $par ) {
8888 global $wgRequest, $wgOut, $wgUser;
8989
@@ -93,7 +93,7 @@
9494 $this->mTarget = is_null( $par )
9595 ? $wgRequest->getVal( 'wpTarget', $wgRequest->getVal( 'target', '' ) )
9696 : $par;
97 -
 97+
9898 $ret = self::getTarget( $this->mTarget );
9999 if( $ret instanceof User ){
100100 $this->mTargetObj = $ret;
@@ -101,7 +101,7 @@
102102 $wgOut->showErrorPage( "{$ret}title", "{$ret}text" );
103103 return false;
104104 }
105 -
 105+
106106 $error = self::getPermissionsError( $wgUser, $wgRequest->getVal( 'wpEditToken' ) );
107107 switch ( $error ) {
108108 case null:
@@ -126,7 +126,7 @@
127127 $wgOut->showErrorPage( $title, $msg, $params );
128128 return;
129129 }
130 -
 130+
131131 $form = new HTMLForm( $this->getFormFields() );
132132 $form->addPreText( wfMsgExt( 'emailpagetext', 'parseinline' ) );
133133 $form->setSubmitText( wfMsg( 'emailsend' ) );
@@ -134,14 +134,14 @@
135135 $form->setSubmitCallback( array( __CLASS__, 'submit' ) );
136136 $form->setWrapperLegend( wfMsgExt( 'email-legend', 'parsemag' ) );
137137 $form->loadData();
138 -
 138+
139139 if( !wfRunHooks( 'EmailUserForm', array( &$form ) ) ){
140140 return false;
141141 }
142 -
 142+
143143 $wgOut->setPagetitle( wfMsg( 'emailpage' ) );
144144 $result = $form->show();
145 -
 145+
146146 if( $result === true || ( $result instanceof Status && $result->isGood() ) ){
147147 $wgOut->setPagetitle( wfMsg( 'emailsent' ) );
148148 $wgOut->addWikiMsg( 'emailsenttext' );
@@ -160,7 +160,7 @@
161161 wfDebug( "Target is empty.\n" );
162162 return 'notarget';
163163 }
164 -
 164+
165165 $nu = User::newFromName( $target );
166166 if( !$nu instanceof User || !$nu->getId() ) {
167167 wfDebug( "Target is invalid user.\n" );
@@ -188,11 +188,11 @@
189189 if( !$wgEnableEmail || !$wgEnableUserEmail ){
190190 return 'usermaildisabled';
191191 }
192 -
 192+
193193 if( !$user->isAllowed( 'sendemail' ) ) {
194194 return 'badaccess';
195195 }
196 -
 196+
197197 if( !$user->isEmailConfirmed() ){
198198 return 'mailnologin';
199199 }
@@ -219,7 +219,7 @@
220220
221221 /**
222222 * Really send a mail. Permissions should have been checked using
223 - * getPermissionsError(). It is probably also a good
 223+ * getPermissionsError(). It is probably also a good
224224 * idea to check the edit token and ping limiter in advance.
225225 *
226226 * @return Mixed: Status object, or potentially a String on error
@@ -239,17 +239,17 @@
240240
241241 // Add a standard footer and trim up trailing newlines
242242 $text = rtrim( $text ) . "\n\n-- \n";
243 - $text .= wfMsgExt(
 243+ $text .= wfMsgExt(
244244 'emailuserfooter',
245 - array( 'content', 'parsemag' ),
246 - array( $from->name, $to->name )
 245+ array( 'content', 'parsemag' ),
 246+ array( $from->name, $to->name )
247247 );
248248
249249 $error = '';
250250 if( !wfRunHooks( 'EmailUser', array( &$to, &$from, &$subject, &$text, &$error ) ) ) {
251251 return $error;
252252 }
253 -
 253+
254254 if( $wgUserEmailUseReplyTo ) {
255255 // Put the generic wiki autogenerated address in the From:
256256 // header and reserve the user for Reply-To.
@@ -284,12 +284,12 @@
285285 return $status;
286286 } else {
287287 // if the user requested a copy of this mail, do this now,
288 - // unless they are emailing themselves, in which case one
 288+ // unless they are emailing themselves, in which case one
289289 // copy of the message is sufficient.
290290 if ( $data['CCMe'] && $to != $from ) {
291291 $cc_subject = wfMsg(
292 - 'emailccsubject',
293 - $target->getName(),
 292+ 'emailccsubject',
 293+ $target->getName(),
294294 $subject
295295 );
296296 wfRunHooks( 'EmailUserCC', array( &$from, &$from, &$cc_subject, &$text ) );

Status & tagging log