New hook 'ImageOpenShowImageInlineBefore' for upcoming extension
authorMagnus Manske <magnusmanske@users.mediawiki.org>
Wed, 16 May 2007 19:52:22 +0000 (19:52 +0000)
committerMagnus Manske <magnusmanske@users.mediawiki.org>
Wed, 16 May 2007 19:52:22 +0000 (19:52 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/ImagePage.php

index de71d4b..dddfec6 100644 (file)
@@ -28,6 +28,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Bulk mail options ($wgEnotifImpersonal, $wgEnotifUseJobQ) for large sites
 * Links to redirect pages in categories are wrapped in <span
   class="redirect-in-category"></span>
+* New hook "ImageOpenShowImageInlineBefore" in ImagePage.php in openShowImage()
   
 == Bugfixes since 1.10 ==
 
index 62e4c46..aa14d3c 100644 (file)
@@ -403,6 +403,10 @@ $title: Title object of page
 $url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getFullURL()
 
+'ImageOpenShowImageInlineBefore': Call potential extension just before showing the image on an image page
+$imagePage: ImagePage object ($this)
+$output: $wgOut
+
 'InternalParseBeforeLinks': during Parser's internalParse method before links but
 after noinclude/includeonly/onlyinclude and other processing.
 &$this: Parser object
index a9f91ae..b41c52c 100644 (file)
@@ -204,6 +204,8 @@ class ImagePage extends Article {
                        $showLink = false;
                        $linkAttribs = array( 'href' => $full_url );
 
+      wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this , &$wgOut ) )        ;
+
                        if ( $this->img->allowInlineDisplay() and $width and $height) {
                                # image