X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flogging%2FLogEntry.php;h=35502c78d299724158f74f6bc8c3db928026af97;hp=bf35d78d25a80c4067ffc6764ebca655340709af;hb=ee56f00ddf0609082f8ae9a4dc3e6e1b6f54ddfd;hpb=7babd362babcbf7f20adb8e12edb4f4bc1d4249f diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php index bf35d78d25..35502c78d2 100644 --- a/includes/logging/LogEntry.php +++ b/includes/logging/LogEntry.php @@ -170,7 +170,7 @@ class DatabaseLogEntry extends LogEntryBase { * @return array */ public static function getSelectQueryData() { - $commentQuery = CommentStore::newKey( 'log_comment' )->getJoin(); + $commentQuery = CommentStore::getStore()->getJoin( 'log_comment' ); $tables = [ 'logging', 'user' ] + $commentQuery['tables']; $fields = [ @@ -265,9 +265,9 @@ class DatabaseLogEntry extends LogEntryBase { public function getParameters() { if ( !isset( $this->params ) ) { $blob = $this->getRawParameters(); - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $params = LogEntryBase::extractParams( $blob ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); if ( $params !== false ) { $this->params = $params; $this->legacy = false; @@ -324,7 +324,7 @@ class DatabaseLogEntry extends LogEntryBase { } public function getComment() { - return CommentStore::newKey( 'log_comment' )->getComment( $this->row )->text; + return CommentStore::getStore()->getComment( 'log_comment', $this->row )->text; } public function getDeleted() { @@ -382,9 +382,9 @@ class RCDatabaseLogEntry extends DatabaseLogEntry { } public function getComment() { - return CommentStore::newKey( 'rc_comment' ) + return CommentStore::getStore() // Legacy because the row may have used RecentChange::selectFields() - ->getCommentLegacy( wfGetDB( DB_REPLICA ), $this->row )->text; + ->getCommentLegacy( wfGetDB( DB_REPLICA ), 'rc_comment', $this->row )->text; } public function getDeleted() { @@ -626,7 +626,7 @@ class ManualLogEntry extends LogEntryBase { if ( isset( $this->deleted ) ) { $data['log_deleted'] = $this->deleted; } - $data += CommentStore::newKey( 'log_comment' )->insert( $dbw, $comment ); + $data += CommentStore::getStore()->insert( $dbw, 'log_comment', $comment ); $dbw->insert( 'logging', $data, __METHOD__ ); $this->id = $dbw->insertId();