$res = $dbr->select( 'recentchanges', array( 'rc_ip' ), $conds,
__METHOD__ , $options );
- if ( !$dbr->numRows( $res ) ) {
+ if ( !$res->numRows() ) {
# No results, don't autoblock anything
wfDebug( "No IP found to retroactively autoblock\n" );
} else {
array()
);
- if ( $dbr->numRows( $res ) > 0 ) {
+ if ( $res->numRows() > 0 ) {
foreach ( $res as $row ) {
// $data[] = Title::newFromText($wgContLang->getNSText ( NS_CATEGORY ).':'.$row->cl_to);
$data[$wgContLang->getNSText( NS_CATEGORY ) . ':' . $row->cl_to] = $this->getFullText();
'pl_from=page_id' ),
__METHOD__ );
$blurlArr = $title->getSquidURLs();
- if ( $dbr->numRows( $res ) <= $wgMaxSquidPurgeTitles ) {
+ if ( $res->numRows() <= $wgMaxSquidPurgeTitles ) {
foreach ( $res as $BL ) {
$tobj = Title::makeTitle( $BL->page_namespace, $BL->page_title ) ;
$blurlArr[] = $tobj->getInternalURL();
$batch->execute();
// Back to start for display
- if ( $db->numRows( $res ) > 0 ) {
+ if ( $res->numRows() > 0 ) {
// If there are no rows we get an error seeking.
$db->dataSeek( $res, 0 );
}
$joinConds);
}
- if( ( !$fetchlinks || !$dbr->numRows($plRes) ) && ( $hidetrans || !$dbr->numRows($tlRes) ) && ( $hideimages || !$dbr->numRows($ilRes) ) ) {
+ if( ( !$fetchlinks || !$plRes->numRows() ) && ( $hidetrans || !$tlRes->numRows() ) && ( $hideimages || !$ilRes->numRows() ) ) {
if ( 0 == $level ) {
$out->addHTML( $this->whatlinkshereForm() );
$dbw = wfGetDB( DB_MASTER );
$masterIDs = array();
$res = $dbw->select( 'page', array( 'page_id', 'page_latest' ), array( 'page_id<6054123' ), __METHOD__ );
- $this->output( "Number of pages: " . $dbw->numRows( $res ) . "\n" );
+ $this->output( "Number of pages: " . $res->numRows() . "\n" );
foreach ( $res as $row ) {
$masterIDs[$row->page_id] = $row->page_latest;
if ( !( ++$n % 10000 ) ) {
FROM $revision LEFT OUTER JOIN $page ON rev_page=page_id
WHERE page_id IS NULL
" );
- $orphans = $dbw->numRows( $result );
+ $orphans = $result->numRows();
if ( $orphans > 0 ) {
global $wgContLang;
$this->output( "$orphans orphan revisions...\n" );
FROM $page LEFT OUTER JOIN $revision ON page_latest=rev_id
WHERE rev_id IS NULL
" );
- $widows = $dbw->numRows( $result );
+ $widows = $result->numRows();
if ( $widows > 0 ) {
$this->output( "$widows childless pages...\n" );
$this->output( sprintf( "%10s %11s %2s %s\n", 'page_id', 'page_latest', 'ns', 'page_title' ) );
);
$start = 0;
- $end = $dbr->numRows( $result );
+ $end = $result->numRows();
$this->output( "Will purge $end pages from namespace $ns\n" );
# Do remaining chunk
array(),
array( 'redirect' => array( "LEFT JOIN", "page_id=rd_from" ) )
);
- $num = $dbr->numRows( $res );
+ $num = $res->numRows();
$this->output( "Refreshing $num old redirects from $start...\n" );
$i = 0;
"page_id >= $start" ),
__METHOD__
);
- $num = $dbr->numRows( $res );
+ $num = $res->numRows();
$this->output( "$num new articles...\n" );
$i = 0;
do {
$res = $dbw->select( 'text', array( 'old_id','old_flags','old_text' ),
"old_id>=$start", __METHOD__, array( 'ORDER BY' => 'old_id', 'LIMIT' => $chunksize, 'FOR UPDATE' ) );
- if( $dbw->numRows( $res ) == 0 ) {
+ if( $res->numRows() == 0 ) {
break;
}
$last = $start;
$pageRes = $dbr->select( 'page',
array('page_id', 'page_namespace', 'page_title','page_latest'),
$pageConds + array('page_id' => $pageId), __METHOD__ );
- if ( $dbr->numRows( $pageRes ) == 0 ) {
+ if ( $pageRes->numRows() == 0 ) {
continue;
}
$pageRow = $dbr->fetchObject( $pageRes );