* @author Aaron Schulz
*/
+use MediaWiki\MediaWikiServices;
+
/**
* Version of FileJournal that logs to a DB table
* @since 1.20
* @see FileJournal::logChangeBatch()
* @param array $entries
* @param string $batchId
- * @return Status
+ * @return StatusValue
*/
protected function doLogChangeBatch( array $entries, $batchId ) {
- $status = Status::newGood();
+ $status = StatusValue::newGood();
try {
$dbw = $this->getMasterDB();
/**
* @see FileJournal::purgeOldLogs()
- * @return Status
+ * @return StatusValue
* @throws DBError
*/
protected function doPurgeOldLogs() {
- $status = Status::newGood();
+ $status = StatusValue::newGood();
if ( $this->ttlDays <= 0 ) {
return $status; // nothing to do
}
protected function getMasterDB() {
if ( !$this->dbw ) {
// Get a separate connection in autocommit mode
- $lb = wfGetLBFactory()->newMainLB();
+ $lb = MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->newMainLB();
$this->dbw = $lb->getConnection( DB_MASTER, [], $this->wiki );
$this->dbw->clearFlag( DBO_TRX );
}