X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilebackend%2Ffilejournal%2FDBFileJournal.php;h=d09c245877502b9dee501681cf06e83010bc3f28;hb=8e8b4167ce356e3d516f4607c1c72a909bb3c24c;hp=7efb3a15c1c64a117e39864687f1fd6edddebdc8;hpb=d42754e47722436ef52218f21a8e544a05ee9ad7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filebackend/filejournal/DBFileJournal.php b/includes/filebackend/filejournal/DBFileJournal.php index 7efb3a15c1..d09c245877 100644 --- a/includes/filebackend/filejournal/DBFileJournal.php +++ b/includes/filebackend/filejournal/DBFileJournal.php @@ -22,6 +22,9 @@ * @author Aaron Schulz */ +use MediaWiki\MediaWikiServices; +use Wikimedia\Rdbms\IDatabase; + /** * Version of FileJournal that logs to a DB table * @since 1.20 @@ -48,10 +51,10 @@ class DBFileJournal extends FileJournal { * @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(); @@ -151,11 +154,11 @@ class DBFileJournal extends FileJournal { /** * @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 } @@ -180,7 +183,7 @@ class DBFileJournal extends FileJournal { 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 ); }