From: Ricordisamoa Date: Mon, 29 Dec 2014 15:02:45 +0000 (+0100) Subject: Run the ImagePageShowTOC hook before adding the 'metadata' link X-Git-Tag: 1.31.0-rc.0~12694^2 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=6ca300c75e5ccce971ec2b4719d48a26fa4efd0e;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ''; }