X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fgallery%2FImageGalleryBase.php;h=eeb8a8ff849e7675f5d28ca326e3310827a9b527;hp=6884f65626dd66f8485885feb2de0e9ad376b145;hb=d5a7166771613dfe4ed9fb75fa5efeced6134bd1;hpb=bdfe02223205923d923923dd420ba0dd863cd0fe diff --git a/includes/gallery/ImageGalleryBase.php b/includes/gallery/ImageGalleryBase.php index 6884f65626..eeb8a8ff84 100644 --- a/includes/gallery/ImageGalleryBase.php +++ b/includes/gallery/ImageGalleryBase.php @@ -38,6 +38,11 @@ abstract class ImageGalleryBase extends ContextSource { */ protected $mShowBytes; + /** + * @var bool Whether to show the dimensions in categories + */ + protected $mShowDimensions; + /** * @var bool Whether to show the filename. Default: true */ @@ -136,6 +141,7 @@ abstract class ImageGalleryBase extends ContextSource { $galleryOptions = $this->getConfig()->get( 'GalleryOptions' ); $this->mImages = []; $this->mShowBytes = $galleryOptions['showBytes']; + $this->mShowDimensions = $galleryOptions['showDimensions']; $this->mShowFilename = true; $this->mParser = false; $this->mHideBadImages = false; @@ -283,6 +289,16 @@ abstract class ImageGalleryBase extends ContextSource { return empty( $this->mImages ); } + /** + * Enable/Disable showing of the dimensions of an image in the gallery. + * Enabled by default. + * + * @param bool $f Set to false to disable + */ + function setShowDimensions( $f ) { + $this->mShowDimensions = (bool)$f; + } + /** * Enable/Disable showing of the file size of an image in the gallery. * Enabled by default.