From 6ca300c75e5ccce971ec2b4719d48a26fa4efd0e Mon Sep 17 00:00:00 2001 From: Ricordisamoa Date: Mon, 29 Dec 2014 16:02:45 +0100 Subject: [PATCH] Run the ImagePageShowTOC hook before adding the 'metadata' link For consistency with the ImagePageAfterImageLinks hook, which places the content before the 'metadata' section. Change-Id: Ibcffdd803ed0a6169558ea247e6ec812c356444d --- includes/page/ImagePage.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php index b4409c3560..b8f67c2e2c 100644 --- a/includes/page/ImagePage.php +++ b/includes/page/ImagePage.php @@ -241,12 +241,13 @@ class ImagePage extends Article { '
  • ' . $this->getContext()->msg( 'filehist' )->escaped() . '
  • ', '
  • ' . $this->getContext()->msg( 'imagelinks' )->escaped() . '
  • ', ); + + Hooks::run( 'ImagePageShowTOC', array( $this, &$r ) ); + if ( $metadata ) { $r[] = '
  • ' . $this->getContext()->msg( 'metadata' )->escaped() . '
  • '; } - Hooks::run( 'ImagePageShowTOC', array( $this, &$r ) ); - return ''; } -- 2.20.1