Mark various skin/OutputPage hooks as unabortable
[lhc/web/wiklou.git] / includes / skins / SkinTemplate.php
index cbffe1e..0690f03 100644 (file)
@@ -462,11 +462,11 @@ class SkinTemplate extends Skin {
                $tpl->set( 'printfooter', $this->printSource() );
                // Wrap the bodyText with #mw-content-text element
                $out->mBodytext = $this->wrapHTML( $title, $out->mBodytext );
-               $tpl->setRef( 'bodytext', $out->mBodytext );
+               $tpl->set( 'bodytext', $out->mBodytext );
 
                $language_urls = $this->getLanguages();
                if ( count( $language_urls ) ) {
-                       $tpl->setRef( 'language_urls', $language_urls );
+                       $tpl->set( 'language_urls', $language_urls );
                } else {
                        $tpl->set( 'language_urls', false );
                }
@@ -475,8 +475,8 @@ class SkinTemplate extends Skin {
                $tpl->set( 'personal_urls', $this->buildPersonalUrls() );
                $content_navigation = $this->buildContentNavigationUrls();
                $content_actions = $this->buildContentActionUrls( $content_navigation );
-               $tpl->setRef( 'content_navigation', $content_navigation );
-               $tpl->setRef( 'content_actions', $content_actions );
+               $tpl->set( 'content_navigation', $content_navigation );
+               $tpl->set( 'content_actions', $content_actions );
 
                $tpl->set( 'sidebar', $this->buildSidebar() );
                $tpl->set( 'nav_urls', $this->buildNavUrls() );
@@ -729,7 +729,7 @@ class SkinTemplate extends Skin {
                        }
                }
 
-               Hooks::run( 'PersonalUrls', [ &$personal_urls, &$title, $this ] );
+               Hooks::runWithoutAbort( 'PersonalUrls', [ &$personal_urls, &$title, $this ] );
                return $personal_urls;
        }
 
@@ -811,6 +811,9 @@ class SkinTemplate extends Skin {
 
        /**
         * @todo is this even used?
+        * @param string $name
+        * @param string $urlaction
+        * @return array
         */
        function makeArticleUrlDetails( $name, $urlaction = '' ) {
                $title = Title::newFromText( $name );
@@ -1092,7 +1095,10 @@ class SkinTemplate extends Skin {
 
                        // Avoid PHP 7.1 warning of passing $this by reference
                        $skinTemplate = $this;
-                       Hooks::run( 'SkinTemplateNavigation', [ &$skinTemplate, &$content_navigation ] );
+                       Hooks::runWithoutAbort(
+                               'SkinTemplateNavigation',
+                               [ &$skinTemplate, &$content_navigation ]
+                       );
 
                        if ( $userCanRead && !$wgDisableLangConversion ) {
                                $pageLang = $title->getPageLanguage();
@@ -1136,14 +1142,15 @@ class SkinTemplate extends Skin {
 
                        // Avoid PHP 7.1 warning of passing $this by reference
                        $skinTemplate = $this;
-                       Hooks::run( 'SkinTemplateNavigation::SpecialPage',
+                       Hooks::runWithoutAbort( 'SkinTemplateNavigation::SpecialPage',
                                [ &$skinTemplate, &$content_navigation ] );
                }
 
                // Avoid PHP 7.1 warning of passing $this by reference
                $skinTemplate = $this;
                // Equiv to SkinTemplateContentActions
-               Hooks::run( 'SkinTemplateNavigation::Universal', [ &$skinTemplate, &$content_navigation ] );
+               Hooks::runWithoutAbort( 'SkinTemplateNavigation::Universal',
+                       [ &$skinTemplate, &$content_navigation ] );
 
                // Setup xml ids and tooltip info
                foreach ( $content_navigation as $section => &$links ) {