From 03bf64c84c1015a62f715ad26fa1bc14023528a0 Mon Sep 17 00:00:00 2001 From: Florianschmidtwelzow Date: Mon, 22 Dec 2014 16:39:52 +0100 Subject: [PATCH] Really allow Extensions to make a new gallery format Adjust GalleryGetModes call to fit Hooks::run() signature. Follow up: I33462a8b52502ed76aeb163b66e3704c8618ba23 Change-Id: I916dade31d6d67de4bb82582cc71585e83fec1c9 --- docs/hooks.txt | 2 +- includes/gallery/ImageGalleryBase.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index f83a6c375c..8d024d64d8 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1261,7 +1261,7 @@ $reason: reason 'GalleryGetModes': Get list of classes that can render different modes of a gallery -$modeArray: An associative array mapping mode names to classes that implement +&$modeArray: An associative array mapping mode names to classes that implement that mode. It is expected all registered classes are a subclass of ImageGalleryBase. diff --git a/includes/gallery/ImageGalleryBase.php b/includes/gallery/ImageGalleryBase.php index bb9a90395a..2a888a50e2 100644 --- a/includes/gallery/ImageGalleryBase.php +++ b/includes/gallery/ImageGalleryBase.php @@ -120,7 +120,7 @@ abstract class ImageGalleryBase extends ContextSource { 'packed-overlay' => 'PackedOverlayImageGallery', ); // Allow extensions to make a new gallery format. - Hooks::run( 'GalleryGetModes', self::$modeMapping ); + Hooks::run( 'GalleryGetModes', array( &self::$modeMapping ) ); } } -- 2.20.1