From: Brad Jorsch Date: Mon, 11 Sep 2017 14:33:29 +0000 (-0400) Subject: Use CommentStore::getCommentLegacy with CommentStore::getFields X-Git-Tag: 1.31.0-rc.0~2153^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=035f4635ef1a9ae74d34a08d1aeb9fd51a813e08;p=lhc%2Fweb%2Fwiklou.git Use CommentStore::getCommentLegacy with CommentStore::getFields It doesn't matter when $wgCommentTableSchemaMigrationStage is MIGRATION_OLD, but it'll fail when we start changing that to later migration stages. Follows up I3447a412. Change-Id: I6c010cefedd99324080ec078b83159d12709c1b1 --- diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 6d003d64bf..8aea7abade 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -538,7 +538,8 @@ class LocalFile extends File { $this->extraDataLoaded = true; $this->description = CommentStore::newKey( "{$prefix}description" ) - ->getComment( $row )->text; + // $row is probably using getFields() from self::getCacheFields() + ->getCommentLegacy( wfGetDB( DB_REPLICA ), $row )->text; $array = $this->decodeRow( $row, $prefix );