Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
}
},
"Hooks": {
"SkinBuildSidebar": "HideSidebarHooks::efHideSidebar"
"SidebarBeforeOutput": "HideSidebarHooks::efHideSidebar"
Copy link

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hook signature for SidebarBeforeOutput may differ from SkinBuildSidebar. Please verify that the efHideSidebar method parameters are compatible with the new hook's expected signature.

Copilot uses AI. Check for mistakes.
},
"AutoloadClasses": {
"HideSidebarHooks": "HideSidebar.hooks.php"
"HideSidebarHooks": "includes/HideSidebar.hooks.php"
}
}
2 changes: 1 addition & 1 deletion HideSidebar.hooks.php → includes/HideSidebar.hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class HideSidebarHooks {
public static function efHideSidebar( $skin, &$bar ) {
// Hide sidebar for anonymous users
if ( $skin->getUser()->isAnon() ) {
$url = Title::makeTitle( NS_SPECIAL, 'UserLogin' )->getLocalUrl();
$url = SpecialPage::getTitleFor( 'UserLogin' )->getLocalUrl();
$bar = [];
$bar['navigation'][] = [
'text' => 'Login',
Expand Down