Merge "Move MediaHandler defaults out of global scope"
[lhc/web/wiklou.git] / includes / specials / pagers / ImageListPager.php
index 258ac83..5e10269 100644 (file)
@@ -429,8 +429,11 @@ class ImageListPager extends TablePager {
                                // If statement for paranoia
                                if ( $file ) {
                                        $thumb = $file->transform( [ 'width' => 180, 'height' => 360 ] );
-
-                                       return $thumb->toHtml( [ 'desc-link' => true ] );
+                                       if ( $thumb ) {
+                                               return $thumb->toHtml( [ 'desc-link' => true ] );
+                                       } else {
+                                               return wfMessage( 'thumbnail_error', '' )->escaped();
+                                       }
                                } else {
                                        return htmlspecialchars( $value );
                                }
@@ -490,7 +493,7 @@ class ImageListPager extends TablePager {
                        case 'img_description':
                                return Linker::formatComment( $value );
                        case 'count':
-                               return intval( $value ) + 1;
+                               return $this->getLanguage()->formatNum( intval( $value ) + 1 );
                        case 'top':
                                // Messages: listfiles-latestversion-yes, listfiles-latestversion-no
                                return $this->msg( 'listfiles-latestversion-' . $value );
@@ -561,15 +564,15 @@ class ImageListPager extends TablePager {
                $form->displayForm( '' );
        }
 
-       function getTableClass() {
+       protected function getTableClass() {
                return parent::getTableClass() . ' listfiles';
        }
 
-       function getNavClass() {
+       protected function getNavClass() {
                return parent::getNavClass() . ' listfiles_nav';
        }
 
-       function getSortHeaderClass() {
+       protected function getSortHeaderClass() {
                return parent::getSortHeaderClass() . ' listfiles_sort';
        }