dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "SECURITY: Disable <html> tag on system messages despite $wgRawHtml = true;"
[lhc/web/wiklou.git]
/
includes
/
filebackend
/
filejournal
/
DBFileJournal.php
diff --git
a/includes/filebackend/filejournal/DBFileJournal.php
b/includes/filebackend/filejournal/DBFileJournal.php
index
7efb3a1
..
d09c245
100644
(file)
--- a/
includes/filebackend/filejournal/DBFileJournal.php
+++ b/
includes/filebackend/filejournal/DBFileJournal.php
@@
-22,6
+22,9
@@
* @author Aaron Schulz
*/
* @author Aaron Schulz
*/
+use MediaWiki\MediaWikiServices;
+use Wikimedia\Rdbms\IDatabase;
+
/**
* Version of FileJournal that logs to a DB table
* @since 1.20
/**
* 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
* @see FileJournal::logChangeBatch()
* @param array $entries
* @param string $batchId
- * @return Status
+ * @return Status
Value
*/
protected function doLogChangeBatch( array $entries, $batchId ) {
*/
protected function doLogChangeBatch( array $entries, $batchId ) {
- $status = Status::newGood();
+ $status = Status
Value
::newGood();
try {
$dbw = $this->getMasterDB();
try {
$dbw = $this->getMasterDB();
@@
-151,11
+154,11
@@
class DBFileJournal extends FileJournal {
/**
* @see FileJournal::purgeOldLogs()
/**
* @see FileJournal::purgeOldLogs()
- * @return Status
+ * @return Status
Value
* @throws DBError
*/
protected function doPurgeOldLogs() {
* @throws DBError
*/
protected function doPurgeOldLogs() {
- $status = Status::newGood();
+ $status = Status
Value
::newGood();
if ( $this->ttlDays <= 0 ) {
return $status; // nothing to do
}
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
protected function getMasterDB() {
if ( !$this->dbw ) {
// Get a separate connection in autocommit mode
- $lb =
wfGetLB
Factory()->newMainLB();
+ $lb =
MediaWikiServices::getInstance()->getDBLoadBalancer
Factory()->newMainLB();
$this->dbw = $lb->getConnection( DB_MASTER, [], $this->wiki );
$this->dbw->clearFlag( DBO_TRX );
}
$this->dbw = $lb->getConnection( DB_MASTER, [], $this->wiki );
$this->dbw->clearFlag( DBO_TRX );
}