http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84644
Revision: 84644
Author: ialex
Date: 2011-03-23 22:35:36 +0000 (Wed, 23 Mar 2011)
Log Message:
-----------
And I forgot to commit this in r84631
Modified Paths:
--------------
trunk/extensions/SmoothGallery/SmoothGallery.php
Modified: trunk/extensions/SmoothGallery/SmoothGallery.php
===================================================================
--- trunk/extensions/SmoothGallery/SmoothGallery.php 2011-03-23 22:29:56 UTC
(rev 84643)
+++ trunk/extensions/SmoothGallery/SmoothGallery.php 2011-03-23 22:35:36 UTC
(rev 84644)
@@ -41,7 +41,7 @@
'url' =>
'http://www.mediawiki.org/wiki/Extension:SmoothGallery',
);
-$wgExtensionFunctions[] = "efSmoothGallery";
+$wgHooks['ParserFirstCallInit'][] = 'efSmoothGallerySetHooks';
$wgHooks['OutputPageParserOutput'][] = 'smoothGalleryParserOutput';
@@ -62,13 +62,12 @@
$wgSmoothGalleryThumbHeight = "75px";
$wgSmoothGalleryThumbWidth = "100px";
-function efSmoothGallery() {
- global $wgParser;
+function efSmoothGallerySetHooks( $parser ) {
+ $parser->setHook( 'sgallery', 'initSmoothGalleryTag' );
+ $parser->setHook( 'sgalleryset', 'initSmoothGalleryTagSet' );
- $wgParser->setHook( 'sgallery', 'initSmoothGalleryTag' );
- $wgParser->setHook( 'sgalleryset', 'initSmoothGalleryTagSet' );
-
- $wgParser->setFunctionHook( 'sgallery', 'initSmoothGalleryPF' );
+ $parser->setFunctionHook( 'sgallery', 'initSmoothGalleryPF' );
+ return true;
}
// FIXME: split off to a hook file and use $wgHooks['ParserFirstCallInit'] to
init tags
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs