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=b69a29967b65acead0ab40ed49239dc188438b91;hpb=426719108b86bba70e5b321e3386f40849471426;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryProtectedTitles.php b/includes/api/ApiQueryProtectedTitles.php index b69a29967b..f5266850bd 100644 --- a/includes/api/ApiQueryProtectedTitles.php +++ b/includes/api/ApiQueryProtectedTitles.php @@ -1,9 +1,5 @@ .@gmail.com" * * This program is free software; you can redistribute it and/or modify @@ -59,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'] ); @@ -134,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 ); }