$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;
}
}
# 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;
$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 );
}
# 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;
'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 );
$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;
}
# 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' );
}