MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348101 )

Change subject: tramp history
......................................................................

tramp history

Change-Id: I4ae2fc7b35a5e37da733d64622746d5436e45725
---
M .gitignore
M src/LdapGroups.php
2 files changed, 27 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LdapGroups 
refs/changes/01/348101/1

diff --git a/.gitignore b/.gitignore
index 306ad56..5a01b88 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 *~
 \#*#
-.#*
\ No newline at end of file
+.#*
+.tramp_history
\ No newline at end of file
diff --git a/src/LdapGroups.php b/src/LdapGroups.php
index 3b78b0a..d676539 100644
--- a/src/LdapGroups.php
+++ b/src/LdapGroups.php
@@ -108,7 +108,7 @@
                $this->setGroupRestrictions( $groupMap );
        }
 
-    protected function setupConnection() {
+       protected function setupConnection() {
                $this->ldap = ldap_connect( $this->param['server'] );
                if ( !$this->ldap ) {
                        throw new MWException( "Error Connecting to LDAP 
server!" );
@@ -121,37 +121,37 @@
                        throw new MWException( "Couldn't bind to LDAP server: " 
.
                                                                   ldap_error( 
$this->ldap ) );
                }
-    }
+       }
 
        protected function doLDAPSearch( $match ) {
                wfProfileIn( __METHOD__ );
                $runTime = -microtime( true );
-        $key = wfMemcKey( 'ldapgroups', $match );
-        $cache = wfGetMainCache();
-        $entry = $cache->get( $key );
-        if ( $entry === false ) {
-            wfProfileIn( __METHOD__ . " - LDAP Search" );
-            if ( !$this->ldap ) {
-                $this->setupConnection();
-            }
+               $key = wfMemcKey( 'ldapgroups', $match );
+               $cache = wfGetMainCache();
+               $entry = $cache->get( $key );
+               if ( $entry === false ) {
+                       wfProfileIn( __METHOD__ . " - LDAP Search" );
+                       if ( !$this->ldap ) {
+                               $this->setupConnection();
+                       }
 
-            $res = ldap_search( $this->ldap, $this->param['basedn'],
-                                $match, [ "*" ] );
-            if ( !$res ) {
-                wfProfileOut( __METHOD__ . " - LDAP Search" );
-                wfProfileOut( __METHOD__ );
-                throw new MWException( "Error in LDAP search: " .
-                                       ldap_error( $this->ldap ) );
-            }
+                       $res = ldap_search( $this->ldap, $this->param['basedn'],
+                                                               $match, [ "*" ] 
);
+                       if ( !$res ) {
+                               wfProfileOut( __METHOD__ . " - LDAP Search" );
+                               wfProfileOut( __METHOD__ );
+                               throw new MWException( "Error in LDAP search: " 
.
+                                                                          
ldap_error( $this->ldap ) );
+                       }
 
-            $entry = ldap_get_entries( $this->ldap, $res );
-            $cache->set( $key, $entry, 3600 * 24 );
+                       $entry = ldap_get_entries( $this->ldap, $res );
+                       $cache->set( $key, $entry, 3600 * 24 );
 
-            wfProfileOut( __METHOD__ . " - LDAP Search" );
-        }
-        wfProfileOut( __METHOD__ );
-        $runTime += microtime( true );
-        wfDebugLog( __CLASS__, "Ran LDAP search for '$match' in $runTime 
seconds.\n" );
+                       wfProfileOut( __METHOD__ . " - LDAP Search" );
+               }
+               wfProfileOut( __METHOD__ );
+               $runTime += microtime( true );
+               wfDebugLog( __CLASS__, "Ran LDAP search for '$match' in 
$runTime seconds.\n" );
                return $entry;
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ae2fc7b35a5e37da733d64622746d5436e45725
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LdapGroups
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to