Merge pull request #5718 from owncloud/fixLdapBgJob

LDAP: resolve namespace harakiri, fixes background job
This commit is contained in:
Vincent Petry 2013-11-06 08:58:29 -08:00
commit f2eef69047

View file

@ -139,12 +139,12 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
return self::$groupBE; return self::$groupBE;
} }
$configPrefixes = Helper::getServerConfigurationPrefixes(true); $configPrefixes = Helper::getServerConfigurationPrefixes(true);
$ldapWrapper = new OCA\user_ldap\lib\LDAP(); $ldapWrapper = new LDAP();
if(count($configPrefixes) === 1) { if(count($configPrefixes) === 1) {
//avoid the proxy when there is only one LDAP server configured //avoid the proxy when there is only one LDAP server configured
$connector = new OCA\user_ldap\lib\Connection($ldapWrapper, $configPrefixes[0]); $connector = new Connection($ldapWrapper, $configPrefixes[0]);
$ldapAccess = new OCA\user_ldap\lib\Access($connector, $ldapWrapper); $ldapAccess = new Access($connector, $ldapWrapper);
self::$groupBE = new OCA\user_ldap\GROUP_LDAP($ldapAccess); self::$groupBE = new \OCA\user_ldap\GROUP_LDAP($ldapAccess);
} else { } else {
self::$groupBE = new \OCA\user_ldap\Group_Proxy($configPrefixes, $ldapWrapper); self::$groupBE = new \OCA\user_ldap\Group_Proxy($configPrefixes, $ldapWrapper);
} }