X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiQueryBlocks.php;h=10695b30ca22899bc4e84f95a9a7f3d525627f88;hp=698c13c53d4939aff639238503d4e3e75fb59cb9;hb=ee56f00ddf0609082f8ae9a4dc3e6e1b6f54ddfd;hpb=11cf01dd9a8512ad4d9bded43cf22ebd38af8818 diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index 698c13c53d..10695b30ca 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -1,9 +1,5 @@ .@gmail.com" * * This program is free software; you can redistribute it and/or modify @@ -37,7 +33,7 @@ class ApiQueryBlocks extends ApiQueryBase { public function execute() { $db = $this->getDB(); - $commentStore = new CommentStore( 'ipb_reason' ); + $commentStore = CommentStore::getStore(); $params = $this->extractRequestParams(); $this->requireMaxOneParameter( $params, 'users', 'ip' ); @@ -68,7 +64,7 @@ class ApiQueryBlocks extends ApiQueryBase { $fld_flags ); if ( $fld_reason ) { - $commentQuery = $commentStore->getJoin(); + $commentQuery = $commentStore->getJoin( 'ipb_reason' ); $this->addTables( $commentQuery['tables'] ); $this->addFields( $commentQuery['fields'] ); $this->addJoinConds( $commentQuery['joins'] ); @@ -212,7 +208,7 @@ class ApiQueryBlocks extends ApiQueryBase { $block['expiry'] = ApiResult::formatExpiry( $row->ipb_expiry ); } if ( $fld_reason ) { - $block['reason'] = $commentStore->getComment( $row )->text; + $block['reason'] = $commentStore->getComment( 'ipb_reason', $row )->text; } if ( $fld_range && !$row->ipb_auto ) { $block['rangestart'] = IP::formatHex( $row->ipb_range_start );