$return = Title::makeTitle( NS_SPECIAL, $returnto );
$dbw = wfGetDB( DB_MASTER );
- $dbw->begin();
$errors = $rc->doMarkPatrolled();
- $dbw->commit();
if ( in_array(array('rcpatroldisabled'), $errors) ) {
$wgOut->showErrorPage( 'rcpatroldisabled', 'rcpatroldisabledtext' );
wfProfileIn( __METHOD__ );
$dbw = wfGetDB( DB_MASTER );
- $dbw->begin();
$revision = new Revision( array(
'page' => $this->getId(),
'text' => $text,
) );
$revision->insertOn( $dbw );
$this->updateRevisionOn( $dbw, $revision );
- $dbw->commit();
wfRunHooks( 'NewRevisionFromEditComplete', array($this, $revision, false) );
if ( count( $templates_diff ) > 0 ) {
# Whee, link updates time.
$u = new LinksUpdate( $this->mTitle, $parserOutput );
-
- $dbw = wfGetDb( DB_MASTER );
- $dbw->begin();
-
$u->doUpdate();
-
- $dbw->commit();
}
}
$dbr = wfGetDB( DB_SLAVE, array( 'SpecialStatistics', 'vslow') );
list( $page, $user ) = $dbr->tableNamesN( 'page', 'user' );
- $sql = "SELECT COUNT(page_namespace) AS total FROM $page";
+ $sql = "SELECT COUNT(*) AS total FROM $page";
$res = $dbr->query( $sql, $fname );
$pageRow = $dbr->fetchObject( $res );
$pages = $pageRow->total + $this->mPages;
- $sql = "SELECT COUNT(user_id) AS total FROM $user";
+ $sql = "SELECT COUNT(*) AS total FROM $user";
$res = $dbr->query( $sql, $fname );
$userRow = $dbr->fetchObject( $res );
$users = $userRow->total + $this->mUsers;
if ( $updates ) {
$site_stats = $dbw->tableName( 'site_stats' );
$sql = $dbw->limitResultForUpdate("UPDATE $site_stats SET $updates", 1);
- $dbw->begin();
$dbw->query( $sql, $fname );
- $dbw->commit();
}
}
$activeUsers = $dbr->selectField( 'recentchanges', 'COUNT( DISTINCT rc_user_text )',
array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers'" ),
__METHOD__ );
- $dbw->begin();
$dbw->update( 'site_stats',
array( 'ss_active_users' => intval($activeUsers) ),
array( 'ss_row_id' => 1 ), __METHOD__, array( 'LIMIT' => 1 )
);
- $dbw->commit();
}
}
$latest = $this->getLatestRevID();
$dbw = wfGetDB( DB_MASTER );
- $dbw->begin();
# Delete the old redirect. We don't save it to history since
# by definition if we've got here it's rather uninteresting.
}
}
}
- $dbw->commit();
# Log the move
$log = new LogPage( 'move' );
$latest = $this->getLatestRevId();
$dbw = wfGetDB( DB_MASTER );
- $dbw->begin();
$now = $dbw->timestamp();
# Save a null revision in the page's history notifying of the move
}
}
}
- $dbw->commit();
# Log the move
$log = new LogPage( 'move' );
$ret->seek( 0 );
}
- $dbw->begin();
if( $makepage ) {
$newid = $article->insertOn( $dbw );
$pageId = $newid;
return self::UNDELETE_UNKNOWNERR;
}
- $dbw->commit();
return $restored;
}