Merge "Introduce ApiFeedContributions::feedItem hook"
[lhc/web/wiklou.git] / includes / page / ImagePage.php
index b4409c3..b8f67c2 100644 (file)
@@ -241,12 +241,13 @@ class ImagePage extends Article {
                        '<li><a href="#filehistory">' . $this->getContext()->msg( 'filehist' )->escaped() . '</a></li>',
                        '<li><a href="#filelinks">' . $this->getContext()->msg( 'imagelinks' )->escaped() . '</a></li>',
                );
+
+               Hooks::run( 'ImagePageShowTOC', array( $this, &$r ) );
+
                if ( $metadata ) {
                        $r[] = '<li><a href="#metadata">' . $this->getContext()->msg( 'metadata' )->escaped() . '</a></li>';
                }
 
-               Hooks::run( 'ImagePageShowTOC', array( $this, &$r ) );
-
                return '<ul id="filetoc">' . implode( "\n", $r ) . '</ul>';
        }