X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryProtectedTitles.php;h=f5266850bd2a56f659f0a5cf2e7b9377ae7e7324;hb=a3a7176b6539f97d4f723aaacc20f0c18a48bc1d;hp=843e209ec014cfac2d603294359bc4f90ba3ae7e;hpb=e69bcfad17d67da5113cdd75276a5f7b5cefb123;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryProtectedTitles.php b/includes/api/ApiQueryProtectedTitles.php index 843e209ec0..f5266850bd 100644 --- a/includes/api/ApiQueryProtectedTitles.php +++ b/includes/api/ApiQueryProtectedTitles.php @@ -55,8 +55,8 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase { $this->addFieldsIf( 'pt_create_perm', isset( $prop['level'] ) ); if ( isset( $prop['comment'] ) || isset( $prop['parsedcomment'] ) ) { - $commentStore = new CommentStore( 'pt_reason' ); - $commentQuery = $commentStore->getJoin(); + $commentStore = CommentStore::getStore(); + $commentQuery = $commentStore->getJoin( 'pt_reason' ); $this->addTables( $commentQuery['tables'] ); $this->addFields( $commentQuery['fields'] ); $this->addJoinConds( $commentQuery['joins'] ); @@ -130,12 +130,12 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase { } if ( isset( $prop['comment'] ) ) { - $vals['comment'] = $commentStore->getComment( $row )->text; + $vals['comment'] = $commentStore->getComment( 'pt_reason', $row )->text; } if ( isset( $prop['parsedcomment'] ) ) { $vals['parsedcomment'] = Linker::formatComment( - $commentStore->getComment( $row )->text, $titles + $commentStore->getComment( 'pt_reason', $row )->text, $titles ); }