Skip to content

Commit

Permalink
Fixes Error: Class "Hooks" not found (#23)
Browse files Browse the repository at this point in the history
Fixes: #22
  • Loading branch information
jdlrobson authored Jan 22, 2024
1 parent d4d590b commit 3362a4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions LibertyHooks.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php //phpcs:ignore
class LibertyHooks extends Hooks {
<?php

//phpcs:ignore
class LibertyHooks {
/**
* @since 1.17.0
* @param OutputPage $out
Expand Down
6 changes: 4 additions & 2 deletions LibertyTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,10 @@ protected function getNotification() {
protected function renderPortal( $contents ) {
$skin = $this->getSkin();
$user = $skin->getUser();
$userGroup = $user->getGroups();
$userRights = MediaWikiServices::getInstance()->getPermissionManager()->getUserPermissions( $user );
$services = MediaWikiServices::getInstance();
$userGroupManager = $services->getUserGroupManager();
$userGroup = $userGroupManager->getUserGroups( $user );
$userRights = $services->getPermissionManager()->getUserPermissions( $user );

foreach ( $contents as $content ) {
if ( !$content ) {
Expand Down

0 comments on commit 3362a4e

Please sign in to comment.