Merge "PHP 7 compatibility: Fix variable interpolation in ImageGalleryBase.php"
[lhc/web/wiklou.git] / includes / gallery / ImageGalleryBase.php
index 2a888a5..9ea9702 100644 (file)
 abstract class ImageGalleryBase extends ContextSource {
        /**
         * @var array Gallery images
-        * @deprecated since 1.23 (was declared "var") and will be removed in 1.24
         */
-       public $mImages;
+       protected $mImages;
 
        /**
         * @var bool Whether to show the filesize in bytes in categories
-        * @deprecated since 1.23 (was declared "var") and will be removed in 1.24
         */
-       public $mShowBytes;
+       protected $mShowBytes;
 
        /**
         * @var bool Whether to show the filename. Default: true
-        * @deprecated since 1.23 (was declared "var") and will be removed in 1.24
         */
-       public $mShowFilename;
+       protected $mShowFilename;
 
        /**
         * @var string Gallery mode. Default: traditional
-        * @deprecated since 1.23 (was declared "var") and will be removed in 1.24
         */
-       public $mMode;
+       protected $mMode;
 
        /**
         * @var bool|string Gallery caption. Default: false
-        * @deprecated since 1.23 (was declared "var") and will be removed in 1.24
         */
-       public $mCaption = false;
+       protected $mCaption = false;
 
        /**
         * @var bool Hide blacklisted images?
-        * @deprecated since 1.23 (was declared "var") and will be removed in 1.24
         */
-       public $mHideBadImages;
+       protected $mHideBadImages;
 
        /**
         * @var Parser Registered parser object for output callbacks
@@ -104,7 +98,8 @@ abstract class ImageGalleryBase extends ContextSource {
                $mode = $wgContLang->lc( $mode );
 
                if ( isset( self::$modeMapping[$mode] ) ) {
-                       return new self::$modeMapping[$mode]( $mode, $context );
+                       $class = self::$modeMapping[$mode];
+                       return new $class( $mode, $context );
                } else {
                        throw new MWException( "No gallery class registered for mode $mode" );
                }