From 9ffa645af88e9b414c66d09e12a7d7d9d3449cfe Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 18 Apr 2011 17:39:07 +0000 Subject: [PATCH] Update all core calls of SpecialPage->getName(); --- includes/QueryPage.php | 16 ++++++++-------- includes/specials/SpecialWithoutinterwiki.php | 2 +- maintenance/updateSpecialPages.php | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/includes/QueryPage.php b/includes/QueryPage.php index 17a641bcf0..055d923160 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -277,7 +277,7 @@ abstract class QueryPage extends SpecialPage { $fname = get_class( $this ) . '::recache'; $dbw = wfGetDB( DB_MASTER ); - $dbr = wfGetDB( DB_SLAVE, array( $this->getName(), __METHOD__, 'vslow' ) ); + $dbr = wfGetDB( DB_SLAVE, array( $this->name(), __METHOD__, 'vslow' ) ); if ( !$dbw || !$dbr ) { return false; } @@ -288,7 +288,7 @@ abstract class QueryPage extends SpecialPage { } # Clear out any old cached data - $dbw->delete( 'querycache', array( 'qc_type' => $this->getName() ), $fname ); + $dbw->delete( 'querycache', array( 'qc_type' => $this->name() ), $fname ); # Do query $res = $this->reallyDoQuery( $limit, false ); $num = false; @@ -308,7 +308,7 @@ abstract class QueryPage extends SpecialPage { $value = 0; } - $vals[] = array( 'qc_type' => $this->getName(), + $vals[] = array( 'qc_type' => $this->name(), 'qc_namespace' => $row->namespace, 'qc_title' => $row->title, 'qc_value' => $value ); @@ -327,8 +327,8 @@ abstract class QueryPage extends SpecialPage { } # Update the querycache_info record for the page - $dbw->delete( 'querycache_info', array( 'qci_type' => $this->getName() ), $fname ); - $dbw->insert( 'querycache_info', array( 'qci_type' => $this->getName(), 'qci_timestamp' => $dbw->timestamp() ), $fname ); + $dbw->delete( 'querycache_info', array( 'qci_type' => $this->name() ), $fname ); + $dbw->insert( 'querycache_info', array( 'qci_type' => $this->name(), 'qci_timestamp' => $dbw->timestamp() ), $fname ); } return $num; @@ -416,7 +416,7 @@ abstract class QueryPage extends SpecialPage { 'qc_namespace AS namespace', 'qc_title AS title', 'qc_value AS value' ), - array( 'qc_type' => $this->getName() ), + array( 'qc_type' => $this->name() ), __METHOD__, $options ); return $dbr->resultObject( $res ); @@ -427,7 +427,7 @@ abstract class QueryPage extends SpecialPage { $dbr = wfGetDB( DB_SLAVE ); $fname = get_class( $this ) . '::getCachedTimestamp'; $this->cachedTimestamp = $dbr->selectField( 'querycache_info', 'qci_timestamp', - array( 'qci_type' => $this->getName() ), $fname ); + array( 'qci_type' => $this->name() ), $fname ); } return $this->cachedTimestamp; } @@ -483,7 +483,7 @@ abstract class QueryPage extends SpecialPage { # If updates on this page have been disabled, let the user know # that the data set won't be refreshed for now global $wgDisableQueryPageUpdate; - if ( is_array( $wgDisableQueryPageUpdate ) && in_array( $this->getName(), $wgDisableQueryPageUpdate ) ) { + if ( is_array( $wgDisableQueryPageUpdate ) && in_array( $this->name(), $wgDisableQueryPageUpdate ) ) { $wgOut->addWikiMsg( 'querypage-no-updates' ); } diff --git a/includes/specials/SpecialWithoutinterwiki.php b/includes/specials/SpecialWithoutinterwiki.php index 97633fe5f1..0441f7735b 100644 --- a/includes/specials/SpecialWithoutinterwiki.php +++ b/includes/specials/SpecialWithoutinterwiki.php @@ -49,7 +49,7 @@ class WithoutInterwikiPage extends PageQueryPage { } $prefix = $this->prefix; - $t = SpecialPage::getTitleFor( $this->getName() ); + $t = SpecialPage::getTitleFor( $this->name() ); return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . Xml::openElement( 'fieldset' ) . diff --git a/maintenance/updateSpecialPages.php b/maintenance/updateSpecialPages.php index 46d0fcc5a6..fe56a89e7d 100644 --- a/maintenance/updateSpecialPages.php +++ b/maintenance/updateSpecialPages.php @@ -93,7 +93,7 @@ class UpdateSpecialPages extends Maintenance { $queryPage = new $class; } - if ( !$this->hasOption( 'only' ) || $this->getOption( 'only' ) == $queryPage->getName() ) { + if ( !$this->hasOption( 'only' ) || $this->getOption( 'only' ) == $queryPage->name() ) { $this->output( sprintf( '%-30s ', $special ) ); if ( $queryPage->isExpensive() ) { $t1 = explode( ' ', microtime() ); -- 2.20.1