dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Rename autonym for 'no' from 'norsk bokmål' to 'norsk'"
[lhc/web/wiklou.git]
/
includes
/
gallery
/
ImageGalleryBase.php
diff --git
a/includes/gallery/ImageGalleryBase.php
b/includes/gallery/ImageGalleryBase.php
index
6884f65
..
eeb8a8f
100644
(file)
--- a/
includes/gallery/ImageGalleryBase.php
+++ b/
includes/gallery/ImageGalleryBase.php
@@
-38,6
+38,11
@@
abstract class ImageGalleryBase extends ContextSource {
*/
protected $mShowBytes;
*/
protected $mShowBytes;
+ /**
+ * @var bool Whether to show the dimensions in categories
+ */
+ protected $mShowDimensions;
+
/**
* @var bool Whether to show the filename. Default: true
*/
/**
* @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'];
$galleryOptions = $this->getConfig()->get( 'GalleryOptions' );
$this->mImages = [];
$this->mShowBytes = $galleryOptions['showBytes'];
+ $this->mShowDimensions = $galleryOptions['showDimensions'];
$this->mShowFilename = true;
$this->mParser = false;
$this->mHideBadImages = false;
$this->mShowFilename = true;
$this->mParser = false;
$this->mHideBadImages = false;
@@
-283,6
+289,16
@@
abstract class ImageGalleryBase extends ContextSource {
return empty( $this->mImages );
}
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.
/**
* Enable/Disable showing of the file size of an image in the gallery.
* Enabled by default.