diff options
author | Felix Moeller <mail@felixmoeller.de> | 2012-11-04 11:10:46 +0100 |
---|---|---|
committer | Felix Moeller <mail@felixmoeller.de> | 2012-11-04 11:10:46 +0100 |
commit | 30d7993e0105a6c98cbf61d4253d08acf236aca7 (patch) | |
tree | bbf0cf871a65a2cb897f3a4ea405cf3ca3980c47 /apps/user_ldap | |
parent | f8d1d7787e1112842db81a629dfd84b586fbebda (diff) | |
download | nextcloud-server-30d7993e0105a6c98cbf61d4253d08acf236aca7.tar.gz nextcloud-server-30d7993e0105a6c98cbf61d4253d08acf236aca7.zip |
Checkstyle fixes: NoSpaceAfterComma
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/group_ldap.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/lib/connection.php | 14 | ||||
-rw-r--r-- | apps/user_ldap/settings.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/tests/group_ldap.php | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 6c6cc5679ba..63437310088 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -124,7 +124,7 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface { $this->connection->ldapGroupFilter, $this->connection->ldapGroupMemberAssocAttr.'='.$uid )); - $groups = $this->fetchListOfGroups($filter, array($this->connection->ldapGroupDisplayName,'dn')); + $groups = $this->fetchListOfGroups($filter, array($this->connection->ldapGroupDisplayName, 'dn')); $groups = array_unique($this->ownCloudGroupNames($groups), SORT_LOCALE_STRING); $this->connection->writeToCache($cacheKey, $groups); diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 74ff55355b2..ef92bbad40a 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -180,13 +180,13 @@ class Connection { * Caches the general LDAP configuration. */ private function readConfiguration($force = false) { - \OCP\Util::writeLog('user_ldap','Checking conf state: isConfigured? '.print_r($this->configured, true).' isForce? '.print_r($force, true).' configID? '.print_r($this->configID, true), \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'Checking conf state: isConfigured? '.print_r($this->configured, true).' isForce? '.print_r($force, true).' configID? '.print_r($this->configID, true), \OCP\Util::DEBUG); if((!$this->configured || $force) && !is_null($this->configID)) { - \OCP\Util::writeLog('user_ldap','Reading the configuration', \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'Reading the configuration', \OCP\Util::DEBUG); $this->config['ldapHost'] = \OCP\Config::getAppValue($this->configID, 'ldap_host', ''); $this->config['ldapPort'] = \OCP\Config::getAppValue($this->configID, 'ldap_port', 389); - $this->config['ldapAgentName'] = \OCP\Config::getAppValue($this->configID, 'ldap_dn',''); - $this->config['ldapAgentPassword'] = base64_decode(\OCP\Config::getAppValue($this->configID, 'ldap_agent_password','')); + $this->config['ldapAgentName'] = \OCP\Config::getAppValue($this->configID, 'ldap_dn', ''); + $this->config['ldapAgentPassword'] = base64_decode(\OCP\Config::getAppValue($this->configID, 'ldap_agent_password', '')); $this->config['ldapBase'] = \OCP\Config::getAppValue($this->configID, 'ldap_base', ''); $this->config['ldapBaseUsers'] = \OCP\Config::getAppValue($this->configID, 'ldap_base_users', $this->config['ldapBase']); $this->config['ldapBaseGroups'] = \OCP\Config::getAppValue($this->configID, 'ldap_base_groups', $this->config['ldapBase']); @@ -194,8 +194,8 @@ class Connection { $this->config['ldapNoCase'] = \OCP\Config::getAppValue($this->configID, 'ldap_nocase', 0); $this->config['turnOffCertCheck'] = \OCP\Config::getAppValue($this->configID, 'ldap_turn_off_cert_check', 0); $this->config['ldapUserDisplayName'] = mb_strtolower(\OCP\Config::getAppValue($this->configID, 'ldap_display_name', 'uid'), 'UTF-8'); - $this->config['ldapUserFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_userlist_filter','objectClass=person'); - $this->config['ldapGroupFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_group_filter','(objectClass=posixGroup)'); + $this->config['ldapUserFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_userlist_filter', 'objectClass=person'); + $this->config['ldapGroupFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_group_filter', '(objectClass=posixGroup)'); $this->config['ldapLoginFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_login_filter', '(uid=%uid)'); $this->config['ldapGroupDisplayName'] = mb_strtolower(\OCP\Config::getAppValue($this->configID, 'ldap_group_display_name', 'uid'), 'UTF-8'); $this->config['ldapQuotaAttribute'] = \OCP\Config::getAppValue($this->configID, 'ldap_quota_attr', ''); @@ -263,7 +263,7 @@ class Connection { if(empty($this->config['ldapGroupFilter']) && empty($this->config['ldapGroupMemberAssocAttr'])) { \OCP\Util::writeLog('user_ldap', 'No group filter is specified, LDAP group feature will not be used.', \OCP\Util::INFO); } - if(!in_array($this->config['ldapUuidAttribute'], array('auto','entryuuid', 'nsuniqueid', 'objectguid')) && (!is_null($this->configID))) { + if(!in_array($this->config['ldapUuidAttribute'], array('auto', 'entryuuid', 'nsuniqueid', 'objectguid')) && (!is_null($this->configID))) { \OCP\Config::setAppValue($this->configID, 'ldap_uuid_attribute', 'auto'); \OCP\Util::writeLog('user_ldap', 'Illegal value for the UUID Attribute, reset to autodetect.', \OCP\Util::INFO); } diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php index f765151456a..95bf6f1ed7d 100644 --- a/apps/user_ldap/settings.php +++ b/apps/user_ldap/settings.php @@ -31,7 +31,7 @@ if ($_POST) { if('ldap_agent_password' == $param) { OCP\Config::setAppValue('user_ldap', $param, base64_encode($_POST[$param])); } elseif('ldap_cache_ttl' == $param) { - if(OCP\Config::getAppValue('user_ldap', $param,'') != $_POST[$param]) { + if(OCP\Config::getAppValue('user_ldap', $param, '') != $_POST[$param]) { $ldap = new \OCA\user_ldap\lib\Connection('user_ldap'); $ldap->clearCache(); OCP\Config::setAppValue('user_ldap', $param, $_POST[$param]); @@ -59,7 +59,7 @@ if ($_POST) { // fill template $tmpl = new OCP\Template( 'user_ldap', 'settings'); foreach($params as $param) { - $value = OCP\Config::getAppValue('user_ldap', $param,''); + $value = OCP\Config::getAppValue('user_ldap', $param, ''); $tmpl->assign($param, $value); } diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php index 2acb8c35a19..f99902d32f5 100644 --- a/apps/user_ldap/tests/group_ldap.php +++ b/apps/user_ldap/tests/group_ldap.php @@ -32,8 +32,8 @@ class Test_Group_Ldap extends UnitTestCase { $this->assertIsA(OC_Group::getGroups(), gettype(array())); $this->assertIsA($group_ldap->getGroups(), gettype(array())); - $this->assertFalse(OC_Group::inGroup('john','dosers'), gettype(false)); - $this->assertFalse($group_ldap->inGroup('john','dosers'), gettype(false)); + $this->assertFalse(OC_Group::inGroup('john', 'dosers'), gettype(false)); + $this->assertFalse($group_ldap->inGroup('john', 'dosers'), gettype(false)); //TODO: check also for expected true result. This backend won't be able to do any modifications, maybe use a dummy for this. $this->assertIsA(OC_Group::getUserGroups('john doe'), gettype(array())); |