From 46a6e4efe66c86745faaa2074f23d0298193ddf3 Mon Sep 17 00:00:00 2001 From: Magnus Manske Date: Wed, 16 May 2007 19:52:22 +0000 Subject: [PATCH] New hook 'ImageOpenShowImageInlineBefore' for upcoming extension --- RELEASE-NOTES | 1 + docs/hooks.txt | 4 ++++ includes/ImagePage.php | 2 ++ 3 files changed, 7 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index de71d4bcb9..dddfec6262 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 +* New hook "ImageOpenShowImageInlineBefore" in ImagePage.php in openShowImage() == Bugfixes since 1.10 == diff --git a/docs/hooks.txt b/docs/hooks.txt index 62e4c46daf..aa14d3cd39 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/ImagePage.php b/includes/ImagePage.php index a9f91aecc4..b41c52c457 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -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 -- 2.20.1