r86334 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86333‎ | r86334 | r86335 >
Date:19:00, 18 April 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Revert r86236
Modified paths:
  • /trunk/phase3/includes/QueryPage.php (modified) (history)
  • /trunk/phase3/maintenance/updateSpecialPages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/updateSpecialPages.php
@@ -93,7 +93,7 @@
9494 $queryPage = new $class;
9595 }
9696
97 - if ( !$this->hasOption( 'only' ) || $this->getOption( 'only' ) == $queryPage->name() ) {
 97+ if ( !$this->hasOption( 'only' ) || $this->getOption( 'only' ) == $queryPage->getName() ) {
9898 $this->output( sprintf( '%-30s ', $special ) );
9999 if ( $queryPage->isExpensive() ) {
100100 $t1 = explode( ' ', microtime() );
Index: trunk/phase3/includes/QueryPage.php
@@ -277,7 +277,7 @@
278278
279279 $fname = get_class( $this ) . '::recache';
280280 $dbw = wfGetDB( DB_MASTER );
281 - $dbr = wfGetDB( DB_SLAVE, array( $this->name(), __METHOD__, 'vslow' ) );
 281+ $dbr = wfGetDB( DB_SLAVE, array( $this->getName(), __METHOD__, 'vslow' ) );
282282 if ( !$dbw || !$dbr ) {
283283 return false;
284284 }
@@ -288,7 +288,7 @@
289289 }
290290
291291 # Clear out any old cached data
292 - $dbw->delete( 'querycache', array( 'qc_type' => $this->name() ), $fname );
 292+ $dbw->delete( 'querycache', array( 'qc_type' => $this->getName() ), $fname );
293293 # Do query
294294 $res = $this->reallyDoQuery( $limit, false );
295295 $num = false;
@@ -308,7 +308,7 @@
309309 $value = 0;
310310 }
311311
312 - $vals[] = array( 'qc_type' => $this->name(),
 312+ $vals[] = array( 'qc_type' => $this->getName(),
313313 'qc_namespace' => $row->namespace,
314314 'qc_title' => $row->title,
315315 'qc_value' => $value );
@@ -327,8 +327,8 @@
328328 }
329329
330330 # Update the querycache_info record for the page
331 - $dbw->delete( 'querycache_info', array( 'qci_type' => $this->name() ), $fname );
332 - $dbw->insert( 'querycache_info', array( 'qci_type' => $this->name(), 'qci_timestamp' => $dbw->timestamp() ), $fname );
 331+ $dbw->delete( 'querycache_info', array( 'qci_type' => $this->getName() ), $fname );
 332+ $dbw->insert( 'querycache_info', array( 'qci_type' => $this->getName(), 'qci_timestamp' => $dbw->timestamp() ), $fname );
333333
334334 }
335335 return $num;
@@ -416,7 +416,7 @@
417417 'qc_namespace AS namespace',
418418 'qc_title AS title',
419419 'qc_value AS value' ),
420 - array( 'qc_type' => $this->name() ),
 420+ array( 'qc_type' => $this->getName() ),
421421 __METHOD__, $options
422422 );
423423 return $dbr->resultObject( $res );
@@ -427,7 +427,7 @@
428428 $dbr = wfGetDB( DB_SLAVE );
429429 $fname = get_class( $this ) . '::getCachedTimestamp';
430430 $this->cachedTimestamp = $dbr->selectField( 'querycache_info', 'qci_timestamp',
431 - array( 'qci_type' => $this->name() ), $fname );
 431+ array( 'qci_type' => $this->getName() ), $fname );
432432 }
433433 return $this->cachedTimestamp;
434434 }
@@ -483,7 +483,7 @@
484484 # If updates on this page have been disabled, let the user know
485485 # that the data set won't be refreshed for now
486486 global $wgDisableQueryPageUpdate;
487 - if ( is_array( $wgDisableQueryPageUpdate ) && in_array( $this->name(), $wgDisableQueryPageUpdate ) ) {
 487+ if ( is_array( $wgDisableQueryPageUpdate ) && in_array( $this->getName(), $wgDisableQueryPageUpdate ) ) {
488488 $wgOut->addWikiMsg( 'querypage-no-updates' );
489489 }
490490

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86236corrected computation of ISO serialisationmkroetzsch20:55, 16 April 2011
r86326Update all core calls of SpecialPage->getName();reedy17:39, 18 April 2011

Comments

#Comment by Hashar (talk | contribs)   19:31, 7 June 2011

you forgot /trunk/phase3/includes/specials/SpecialWithoutinterwiki.php :)

#Comment by Reedy (talk | contribs)   19:34, 7 June 2011

What revision was I actually reverting? :S

#Comment by Reedy (talk | contribs)   19:37, 7 June 2011
#Comment by Reedy (talk | contribs)   19:38, 7 June 2011

The code doesn't exist in trunk

it's now $t = $this->getTitle();

#Comment by Hashar (talk | contribs)   21:02, 7 June 2011

Thanks!

Status & tagging log