X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fgallery%2FImageGalleryBase.php;h=c8a25f0b285074e5890840a0a9e46b7f02c9a753;hb=d6102d26a011337d4786282e8fb89f644aa2f3b7;hp=f26d688ebe3880a171e6b3bb876d9c6cfb68307b;hpb=ba4a2394fc453bf32a5d53015dabe607d022cc44;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/gallery/ImageGalleryBase.php b/includes/gallery/ImageGalleryBase.php index f26d688ebe..c8a25f0b28 100644 --- a/includes/gallery/ImageGalleryBase.php +++ b/includes/gallery/ImageGalleryBase.php @@ -70,7 +70,7 @@ abstract class ImageGalleryBase extends ContextSource { protected $contextTitle = false; /** @var array */ - protected $mAttribs = array(); + protected $mAttribs = []; /** @var bool */ static private $modeMapping = false; @@ -107,15 +107,15 @@ abstract class ImageGalleryBase extends ContextSource { private static function loadModes() { if ( self::$modeMapping === false ) { - self::$modeMapping = array( + self::$modeMapping = [ 'traditional' => 'TraditionalImageGallery', 'nolines' => 'NolinesImageGallery', 'packed' => 'PackedImageGallery', 'packed-hover' => 'PackedHoverImageGallery', 'packed-overlay' => 'PackedOverlayImageGallery', - ); + ]; // Allow extensions to make a new gallery format. - Hooks::run( 'GalleryGetModes', array( &self::$modeMapping ) ); + Hooks::run( 'GalleryGetModes', [ &self::$modeMapping ] ); } } @@ -133,7 +133,7 @@ abstract class ImageGalleryBase extends ContextSource { } $galleryOptions = $this->getConfig()->get( 'GalleryOptions' ); - $this->mImages = array(); + $this->mImages = []; $this->mShowBytes = $galleryOptions['showBytes']; $this->mShowFilename = true; $this->mParser = false; @@ -239,12 +239,12 @@ abstract class ImageGalleryBase extends ContextSource { * @param string $link Override image link (optional) * @param array $handlerOpts Array of options for image handler (aka page number) */ - function add( $title, $html = '', $alt = '', $link = '', $handlerOpts = array() ) { + function add( $title, $html = '', $alt = '', $link = '', $handlerOpts = [] ) { if ( $title instanceof File ) { // Old calling convention $title = $title->getTitle(); } - $this->mImages[] = array( $title, $html, $alt, $link, $handlerOpts ); + $this->mImages[] = [ $title, $html, $alt, $link, $handlerOpts ]; wfDebug( 'ImageGallery::add ' . $title->getText() . "\n" ); } @@ -258,12 +258,12 @@ abstract class ImageGalleryBase extends ContextSource { * @param string $link Override image link (optional) * @param array $handlerOpts Array of options for image handler (aka page number) */ - function insert( $title, $html = '', $alt = '', $link = '', $handlerOpts = array() ) { + function insert( $title, $html = '', $alt = '', $link = '', $handlerOpts = [] ) { if ( $title instanceof File ) { // Old calling convention $title = $title->getTitle(); } - array_unshift( $this->mImages, array( &$title, $html, $alt, $link, $handlerOpts ) ); + array_unshift( $this->mImages, [ &$title, $html, $alt, $link, $handlerOpts ] ); } /**