Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/292793

Change subject: Test
......................................................................

Test

Change-Id: I6c1a043b53d50800a923503996ec41b3a0c6dbdd
---
M AccessControl.hooks.php
M AccessControl.php
2 files changed, 21 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AccessControl 
refs/changes/93/292793/1

diff --git a/AccessControl.hooks.php b/AccessControl.hooks.php
index 2a3b82b..5d28dd6 100644
--- a/AccessControl.hooks.php
+++ b/AccessControl.hooks.php
@@ -21,7 +21,7 @@
 
        public function doControlUserAccess( $input, array $args, Parser 
$parser, PPFrame $frame ) {
                /* Funcion called by accessControlExtension */
-               return self::displayGroups();
+               return displayGroups();
        }
 
        public function accessControl( $tagContent ) {
@@ -30,12 +30,12 @@
                foreach ( $listaccesslist as $accesslist ) {
                        if ( strpos( $accesslist, "(ro)" ) !== false ) {
                                $accesslist = trim( str_replace( "(ro)", "", 
$accesslist ) );
-                               $group = self::makeGrouparray( $accesslist );
+                               $group = makeGrouparray( $accesslist );
                                $accessgroup[1] = array_merge( $accessgroup[1], 
$group[0] );
                                $accessgroup[1] = array_merge( $accessgroup[1], 
$group[1] );
                        } else {
                                $accesslist = trim( $accesslist );
-                               $group = self::makeGrouparray( $accesslist );
+                               $group = makeGrouparray( $accesslist );
                                $accessgroup[0] = array_merge( $accessgroup[0], 
$group[0] );
                                $accessgroup[1] = array_merge( $accessgroup[1], 
$group[1] );
                        }
@@ -50,7 +50,7 @@
                        Second is list readonly users. */
                $userswrite = [];
                $usersreadonly = [];
-               $users = self::getUsersFromPages( $accesslist );
+               $users = getUsersFromPages( $accesslist );
                foreach ( array_keys( $users ) as $user ) {
                        switch ( $users[$user] ) {
                                case 'read':
@@ -173,7 +173,7 @@
                                $start = strpos( $string, '{{{' );
                                $end = strlen( $string );
                                $skok = $start + 3;
-                               self::fromTemplates( substr( $string, $skok, 
$end - $skok ) );
+                               fromTemplates( substr( $string, $skok, $end - 
$skok ) );
                        } else {
                                $start = strpos( $string, '{{' );
                                $end = strpos( $string, '}}' );
@@ -181,17 +181,17 @@
                                $templatepage = substr( $string, $skok, $end - 
$skok );
                                if ( substr( $templatepage, 0, 1 ) == '{' ) {
                                        // The check of included code
-                                       $rights = self::fromTemplates( 
$templatepage );
+                                       $rights = fromTemplates( $templatepage 
);
                                } elseif ( substr( $templatepage, 0, 1 ) == ':' 
) {
                                        // The check of included page
-                                       $rights = self::allRightTags( 
self::getContentPage( 0, substr( $templatepage, 1 ) ) );
+                                       $rights = allRightTags( getContentPage( 
0, substr( $templatepage, 1 ) ) );
                                } elseif ( ctype_alnum( substr( $templatepage, 
0, 1 ) ) ) {
                                        // The check of included template
                                        if ( strpos( $templatepage, '|' ) > 0 ) 
{
                                                $templatename = substr( 
$templatepage, 0, strpos( $templatepage, '|' ) );
-                                               $rights = self::allRightTags( 
self::getContentPage( 10, $templatename ) );
+                                               $rights = allRightTags( 
getContentPage( 10, $templatename ) );
                                        } else {
-                                               $rights = self::allRightTags( 
self::getContentPage( 10, $templatepage ) );
+                                               $rights = allRightTags( 
getContentPage( 10, $templatepage ) );
                                        }
                                }
 
@@ -200,7 +200,7 @@
                                                if ( $wgUser->mId === 0 ) {
                                                        /* Redirection unknown 
users */
                                                        $wgActions['view'] = 
false;
-                                                       self::doRedirect( 
'accesscontrol-move-anonymous' );
+                                                       doRedirect( 
'accesscontrol-move-anonymous' );
                                                } else {
                                                        if ( in_array( 'sysop', 
$wgUser->mGroups, true ) ) {
                                                                if ( isset( 
$wgAdminCanReadAll ) ) {
@@ -209,7 +209,7 @@
                                                                        }
                                                                }
                                                        }
-                                                       $users = 
self::accessControl( $rights['groups'] );
+                                                       $users = accessControl( 
$rights['groups'] );
                                                        if ( !in_array( 
$wgUser->mName, $users[0], true ) ) {
                                                                
$wgActions['edit'] = false;
                                                                
$wgActions['history'] = false;
@@ -224,7 +224,7 @@
                                                                if ( !in_array( 
$wgUser->mName, $users[1], true ) ) {
                                                                        
$wgActions['view'] = false;
 
-                                                                       return 
self::doRedirect( 'accesscontrol-move-users' );
+                                                                       return 
doRedirect( 'accesscontrol-move-users' );
                                                                }
                                                        }
                                                }
@@ -254,11 +254,11 @@
                        $Title = new Title();
                        $gt = $Title->makeTitle( 0, $redirecttarget );
 
-                       return self::allRightTags( self::getContentPage( 
$gt->getNamespace(), $gt ) );
+                       return allRightTags( getContentPage( 
$gt->getNamespace(), $gt ) );
                }
 
                // The control of included pages and templates on appearing of 
accesscontrol tag
-               self::fromTemplates( $string );
+               fromTemplates( $string );
                $start = strpos( $string, $starttag );
                if ( $start !== false ) {
                        $start += strlen( $starttag );
@@ -304,7 +304,7 @@
                        $wgActions['markpatrolled'] = false;
                }
 
-               $rights = self::allRightTags( self::getContentPage(
+               $rights = allRightTags( getContentPage(
                        $title->getNamespace(),
                        $title->mDbkeyform
                ) );
@@ -313,7 +313,7 @@
                        if ( $wgUser->mId === 0 ) {
                                /* Redirection unknown users */
                                $wgActions['view'] = false;
-                               self::doRedirect( 
'accesscontrol-redirect-anonymous' );
+                               doRedirect( 'accesscontrol-redirect-anonymous' 
);
                        } else {
                                if ( in_array( 'sysop', $wgUser->getGroups(), 
true ) ) {
                                        if ( isset( $wgAdminCanReadAll ) ) {
@@ -322,7 +322,7 @@
                                                }
                                        }
                                }
-                               $users = self::accessControl( $rights['groups'] 
);
+                               $users = accessControl( $rights['groups'] );
                                if ( in_array( $wgUser->mName, $users[0], true 
) ) {
                                        return true;
                                } else {
@@ -341,7 +341,7 @@
                                        } else {
                                                $wgActions['view'] = false;
 
-                                               return self::doRedirect( 
'accesscontrol-redirect-users' );
+                                               return doRedirect( 
'accesscontrol-redirect-users' );
                                        }
                                }
                        }
diff --git a/AccessControl.php b/AccessControl.php
index dc4ab55..f12d6da 100644
--- a/AccessControl.php
+++ b/AccessControl.php
@@ -31,12 +31,12 @@
 
 $wgAutoloadClasses['AccessControlHooks'] = __DIR__ . 
'/AccessControl.hooks.php';
 
-$wgHooks['ParserFirstCallInit'][] = 
'AccessControlHooks::accessControlExtension';
+$wgHooks['ParserFirstCallInit'][] = 'accessControlExtension';
 
 $wgMessagesDirs['AccessControl'] = __DIR__ . '/i18n';
 
 // Hook the userCan function for bypassing the cache
-$wgHooks['userCan'][] = 'AccessControlHooks::onUserCan';
+$wgHooks['userCan'][] = 'onUserCan';
 
 // Hook the UnknownAction function for information user about restrictions
-$wgHooks['UnknownAction'][] = 'AccessControlHooks::onUnknownAction';
+$wgHooks['UnknownAction'][] = 'onUnknownAction';

-- 
To view, visit https://gerrit.wikimedia.org/r/292793
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c1a043b53d50800a923503996ec41b3a0c6dbdd
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

Reply via email to