Pass $key into CommentStore methods and use MediawikiServices
[lhc/web/wiklou.git] / includes / specials / pagers / ImageListPager.php
index d80946a..ae19d59 100644 (file)
@@ -267,7 +267,7 @@ class ImageListPager extends TablePager {
                $options = $join_conds = [];
 
                # Description field
-               $commentQuery = CommentStore::newKey( $prefix . '_description' )->getJoin();
+               $commentQuery = CommentStore::getStore()->getJoin( $prefix . '_description' );
                $tables += $commentQuery['tables'];
                $fields += $commentQuery['fields'];
                $join_conds += $commentQuery['joins'];
@@ -498,7 +498,7 @@ class ImageListPager extends TablePager {
                                return htmlspecialchars( $this->getLanguage()->formatSize( $value ) );
                        case 'img_description':
                                $field = $this->mCurrentRow->description_field;
-                               $value = CommentStore::newKey( $field )->getComment( $this->mCurrentRow )->text;
+                               $value = CommentStore::getStore()->getComment( $field, $this->mCurrentRow )->text;
                                return Linker::formatComment( $value );
                        case 'count':
                                return $this->getLanguage()->formatNum( intval( $value ) + 1 );