Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363985 )
Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0 ...................................................................... build: Updating mediawiki/mediawiki-codesniffer to 0.10.0 Change-Id: Ice6b2418ff5a6baf642b0a7952eaa866790c23c3 --- M LdapAuthentication.php M LdapAuthenticationPlugin.php M composer.json M phpcs.xml 4 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LdapAuthentication refs/changes/85/363985/1 diff --git a/LdapAuthentication.php b/LdapAuthentication.php index dc7df51..6e7bc1c 100644 --- a/LdapAuthentication.php +++ b/LdapAuthentication.php @@ -164,6 +164,7 @@ $wgAuth->printDebug( "wgLDAPAutoAuthUsername and wgLDAPAutoAuthDomain is not null, adding hooks.", NONSENSITIVE ); $wgHooks['UserLoadAfterLoadFromSession'][] = 'LdapAutoAuthentication::Authenticate'; - $wgHooks['PersonalUrls'][] = 'LdapAutoAuthentication::NoLogout'; /* Disallow logout link */ + // Disallow logout link + $wgHooks['PersonalUrls'][] = 'LdapAutoAuthentication::NoLogout'; } } diff --git a/LdapAuthenticationPlugin.php b/LdapAuthenticationPlugin.php index a769257..aa04669 100644 --- a/LdapAuthenticationPlugin.php +++ b/LdapAuthenticationPlugin.php @@ -603,7 +603,6 @@ } if ( $this->connect() ) { - $this->userdn = $this->getSearchString( $username ); // It is possible that getSearchString will return an @@ -1516,7 +1515,6 @@ $usertopass = $this->userdn; } else { if ( $this->getConf( 'GroupUseRetrievedUsername' ) && $this->LDAPUsername != '' ) { - $usertopass = $this->LDAPUsername; } else { $usertopass = $username; @@ -1705,7 +1703,7 @@ } $entries = LdapAuthenticationPlugin::ldap_get_entries( $this->ldapconn, $info ); - if ( $entries ){ + if ( $entries ) { // We need to shift because the first entry will be a count array_shift( $entries ); // Let's get a list of both full dn groups and shortname groups @@ -1797,7 +1795,8 @@ # so as the user is currently not a member of the ldap group, he shall be removed from the local group $user->removeGroup( $cGroup ); } - } else { # no, but maybe the user has recently been added to the ldap group? + } else { + # no, but maybe the user has recently been added to the ldap group? $this->printDebug( "Checking to see if user is in: $cGroup", NONSENSITIVE ); if ( $this->hasLDAPGroup( $cGroup ) ) { $this->printDebug( "Adding user to: $cGroup", NONSENSITIVE ); diff --git a/composer.json b/composer.json index eed8ae7..00ef0de 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", "jakub-onderka/php-console-highlighter": "0.3.2", - "mediawiki/mediawiki-codesniffer": "0.7.2" + "mediawiki/mediawiki-codesniffer": "0.10.0" }, "scripts": { "fix": "phpcbf", diff --git a/phpcs.xml b/phpcs.xml index 18af257..c87ec1c 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -2,6 +2,9 @@ <ruleset> <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> <exclude name="Generic.Files.LineLength"/> + <exclude name="MediaWiki.Commenting.FunctionComment"/> + <exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName"/> + <exclude name="MediaWiki.Usage.ReferenceThis.Found"/> </rule> <rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions"> <properties> -- To view, visit https://gerrit.wikimedia.org/r/363985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice6b2418ff5a6baf642b0a7952eaa866790c23c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LdapAuthentication Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits