Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/292792
Change subject: Fix functions not being static ...................................................................... Fix functions not being static Bug: T137020 Bug: T117660 Change-Id: I835442b98af8e6821a6a56a871377dd62ae5b2d7 --- M AccessControl.hooks.php 1 file changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AccessControl refs/changes/92/292792/1 diff --git a/AccessControl.hooks.php b/AccessControl.hooks.php index 2a3b82b..090d474 100644 --- a/AccessControl.hooks.php +++ b/AccessControl.hooks.php @@ -1,7 +1,7 @@ <?php class AccessControlHooks { - public function onUnknownAction( $action, Page $article ) { + public static function onUnknownAction( $action, Page $article ) { global $wgOut; switch ( $action ) { default: @@ -12,19 +12,19 @@ return false; } - public function accessControlExtension( Parser $parser ) { + public static function accessControlExtension( Parser $parser ) { /* This the hook function adds the tag <accesscontrol> to the wiki parser */ - $parser->setHook( "accesscontrol", [ &$this, "doControlUserAccess" ] ); + $parser->setHook( 'accesscontrol', [ 'AccessControlHooks', 'doControlUserAccess' ] ); return true; } - public function doControlUserAccess( $input, array $args, Parser $parser, PPFrame $frame ) { + public static function doControlUserAccess( $input, array $args, Parser $parser, PPFrame $frame ) { /* Funcion called by accessControlExtension */ return self::displayGroups(); } - public function accessControl( $tagContent ) { + public static function accessControl( $tagContent ) { $accessgroup = [ [], [] ]; $listaccesslist = explode( ',', $tagContent ); foreach ( $listaccesslist as $accesslist ) { @@ -44,7 +44,7 @@ return $accessgroup; } - public function makeGrouparray( $accesslist ) { + public static function makeGrouparray( $accesslist ) { /* Function returns array with two lists. First is list full access users. Second is list readonly users. */ @@ -65,7 +65,7 @@ return [ $userswrite, $usersreadonly ]; } - public function displayGroups() { + public static function displayGroups() { /** Function replace the tag <accesscontrol> and his content, * behind info about a protection this the page */ @@ -77,7 +77,7 @@ return $wgAllowInfo; } - public function getContentPage( $namespace, $title ) { + public static function getContentPage( $namespace, $title ) { /* Function get content the page identified by title object from database */ $Title = new Title(); $gt = $Title->makeTitle( $namespace, $title ); @@ -110,7 +110,7 @@ } } - public function getUsersFromPages( $group ) { + public static function getUsersFromPages( $group ) { /* Extracts the allowed users from the userspace access list */ $allowedAccess = []; $allow = []; @@ -148,7 +148,7 @@ return $allowedAccess; } - public function doRedirect( $info ) { + public static function doRedirect( $info ) { /* make redirection for non authorized users */ global $wgScript, $wgSitename, $wgOut, $wgAccessControlRedirect; if ( !$info ) { @@ -165,7 +165,7 @@ } } - public function fromTemplates( $string ) { + public static function fromTemplates( $string ) { global $wgUser, $wgAdminCanReadAll; // Template extraction if ( strpos( $string, '{{' ) >= 0 ) { @@ -287,7 +287,7 @@ } } - public function onUserCan( &$title, &$wgUser, $action, &$result ) { + public static function onUserCan( &$title, &$wgUser, $action, &$result ) { /* Main function control access for all users */ global $wgActions, $wgAdminCanReadAll; if ( $wgUser->mId === 0 ) { -- To view, visit https://gerrit.wikimedia.org/r/292792 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I835442b98af8e6821a6a56a871377dd62ae5b2d7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AccessControl Gerrit-Branch: master Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits