From 7c1a46ba88d29bdcd46d492cabef67ddec45d766 Mon Sep 17 00:00:00 2001 From: Ammar Abdulhamid Date: Fri, 29 May 2020 13:20:10 +0100 Subject: [PATCH] Make hook parameters use consistent name as the Hook interface Param 'bar' was renamed to more descriptive 'sidebar' in the interface. The change should be reflected here. Change-Id: Icdb57a4f801272d408161503d330f3260291c579 --- docs/hooks.txt | 4 ++-- includes/HookContainer/HookRunner.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index 0e4b423b1ac..9d066069acd 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3071,8 +3071,8 @@ $specialSearch: The SpecialSearch object Warning: This hook is run on each display. You should consider to use 'SkinBuildSidebar' that is aggressively cached. $skin: Skin object -&$bar: Sidebar content - Modify $bar to add or modify sidebar portlets. +&$sidebar: Sidebar content + Modify $sidebar to add or modify sidebar portlets. 'SiteNoticeAfter': After the sitenotice/anonnotice is composed. &$siteNotice: HTML sitenotice. Alter the contents of $siteNotice to add to/alter diff --git a/includes/HookContainer/HookRunner.php b/includes/HookContainer/HookRunner.php index 4f30fe2fb1f..1a498df45b0 100644 --- a/includes/HookContainer/HookRunner.php +++ b/includes/HookContainer/HookRunner.php @@ -3424,10 +3424,10 @@ class HookRunner implements ); } - public function onSidebarBeforeOutput( $skin, &$bar ) { + public function onSidebarBeforeOutput( $skin, &$sidebar ) { return $this->container->run( 'SidebarBeforeOutput', - [ $skin, &$bar ] + [ $skin, &$sidebar ] ); }