}
try {
- # Clear out any old cached data
- $dbw->delete( 'querycache', array( 'qc_type' => $this->getName() ), $fname );
# Do query
$res = $this->reallyDoQuery( $limit, false );
$num = false;
'qc_value' => $value );
}
+ $dbw->begin( __METHOD__ );
+ # Clear out any old cached data
+ $dbw->delete( 'querycache', array( 'qc_type' => $this->getName() ), $fname );
# Save results into the querycache table on the master
if ( count( $vals ) ) {
$dbw->insert( 'querycache', $vals, __METHOD__ );
$dbw->insert( 'querycache_info',
array( 'qci_type' => $this->getName(), 'qci_timestamp' => $dbw->timestamp() ),
$fname );
+ $dbw->commit( __METHOD__ );
}
} catch ( DBError $e ) {
if ( !$ignoreErrors ) {
/**
* This is the actual workhorse. It does everything needed to make a
* real, honest-to-gosh query page.
- * @para $par
+ * @param string $par
* @return int
*/
function execute( $par ) {
min( $this->numRows, $this->limit ), # do not show the one extra row, if exist
$this->offset + 1 )->parseAsBlock() );
# Disable the "next" link when we reach the end
- $paging = $this->getLanguage()->viewPrevNext( $this->getTitle( $par ), $this->offset,
+ $paging = $this->getLanguage()->viewPrevNext( $this->getPageTitle( $par ), $this->offset,
$this->limit, $this->linkParameters(), ( $this->numRows <= $this->limit ) );
$out->addHTML( '<p>' . $paging . '</p>' );
} else {
}
function feedUrl() {
- return $this->getTitle()->getFullURL();
+ return $this->getPageTitle()->getFullURL();
}
}