From: Florianschmidtwelzow Date: Mon, 22 Dec 2014 15:39:52 +0000 (+0100) Subject: Really allow Extensions to make a new gallery format X-Git-Tag: 1.31.0-rc.0~12879 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=03bf64c84c1015a62f715ad26fa1bc14023528a0;p=lhc%2Fweb%2Fwiklou.git Really allow Extensions to make a new gallery format Adjust GalleryGetModes call to fit Hooks::run() signature. Follow up: I33462a8b52502ed76aeb163b66e3704c8618ba23 Change-Id: I916dade31d6d67de4bb82582cc71585e83fec1c9 --- 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 ) ); } }