]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/LdapCommon/LdapCommon.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / LdapCommon / LdapCommon.php
index afc61abf7222633c7a5078c0b8555da256b5738f..aea1b72ea4f409f4a641b3542721ed20102adcb2 100644 (file)
@@ -75,6 +75,7 @@ class LdapCommon
 
     function onAutoload($cls)
     {
+        // we've added an extra include-path in the beginning of this file
         switch ($cls)
         {
          case 'MemcacheSchemaCache':
@@ -93,6 +94,8 @@ class LdapCommon
             require_once 'Net/LDAP2/Entry.php';
             return false;
         }
+
+        return true;
     }
 
     function get_ldap_config(){
@@ -367,7 +370,7 @@ class LdapCommon
         mt_srand((double)microtime() * 1000000);
 
         while( strlen( $str ) < $length )
-            $str .= substr( $possible, ( rand() % strlen( $possible ) ), 1 );
+            $str .= substr( $possible, ( mt_rand() % strlen( $possible ) ), 1 );
 
         return $str;
     }