diff options
author | blizzz <blizzz@owncloud.com> | 2015-07-16 11:35:25 +0200 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2015-07-16 11:35:25 +0200 |
commit | bfb90d10edfc863213522c704f7d0b8bad8c8646 (patch) | |
tree | c5db88dab3beb85fb320d7249b8f436dd5f20e14 /apps | |
parent | dce462c28db1d5e5b144efcfb26a466bd290621c (diff) | |
parent | 472d48f6e32168bb7309a4869e469eb305d95f14 (diff) | |
download | nextcloud-server-bfb90d10edfc863213522c704f7d0b8bad8c8646.tar.gz nextcloud-server-bfb90d10edfc863213522c704f7d0b8bad8c8646.zip |
Merge pull request #17046 from nicolas-grekas/fix-16654
Do not use OC*::mb_*_replace(), they are useless
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/group_ldap.php | 6 | ||||
-rw-r--r-- | apps/user_ldap/lib/access.php | 5 | ||||
-rw-r--r-- | apps/user_ldap/lib/wizard.php | 3 |
3 files changed, 5 insertions, 9 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index a7a90c75832..1b83817151c 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -520,8 +520,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { if($isMemberUid) { //we got uids, need to get their DNs to 'translate' them to user names $filter = $this->access->combineFilterWithAnd(array( - \OCP\Util::mb_str_replace('%uid', $member, - $this->access->connection->ldapLoginFilter, 'UTF-8'), + str_replace('%uid', $member, $this->access->connection->ldapLoginFilter), $this->access->getFilterPartForUserSearch($search) )); $ldap_users = $this->access->fetchListOfUsers($filter, 'dn'); @@ -610,8 +609,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { if($isMemberUid) { //we got uids, need to get their DNs to 'translate' them to user names $filter = $this->access->combineFilterWithAnd(array( - \OCP\Util::mb_str_replace('%uid', $member, - $this->access->connection->ldapLoginFilter, 'UTF-8'), + str_replace('%uid', $member, $this->access->connection->ldapLoginFilter), $this->access->getFilterPartForUserSearch($search) )); $ldap_users = $this->access->fetchListOfUsers($filter, 'dn'); diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index b201220d725..89d966772ee 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -632,8 +632,7 @@ class Access extends LDAPUtility implements user\IUserTools { */ public function fetchUsersByLoginName($loginName, $attributes = array('dn')) { $loginName = $this->escapeFilterPart($loginName); - $filter = \OCP\Util::mb_str_replace( - '%uid', $loginName, $this->connection->ldapLoginFilter, 'UTF-8'); + $filter = str_replace('%uid', $loginName, $this->connection->ldapLoginFilter); $users = $this->fetchListOfUsers($filter, $attributes); return $users; } @@ -1012,7 +1011,7 @@ class Access extends LDAPUtility implements user\IUserTools { $name = iconv('UTF-8', 'ASCII//TRANSLIT', $name); // Replacements - $name = \OCP\Util::mb_str_replace(' ', '_', $name, 'UTF-8'); + $name = str_replace(' ', '_', $name); // Every remaining disallowed characters will be removed $name = preg_replace('/[^a-zA-Z0-9_.@-]/u', '', $name); diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php index 6ca84c8718f..13ccf805b69 100644 --- a/apps/user_ldap/lib/wizard.php +++ b/apps/user_ldap/lib/wizard.php @@ -630,8 +630,7 @@ class Wizard extends LDAPUtility { if($this->ldap->errno($cr) !== 0) { throw new \Exception($this->ldap->error($cr)); } - $filter = \OCP\Util::mb_str_replace( - '%uid', $loginName, $this->access->connection->ldapLoginFilter, 'UTF-8'); + $filter = str_replace('%uid', $loginName, $this->access->connection->ldapLoginFilter); $this->result->addChange('ldap_test_loginname', count($users)); $this->result->addChange('ldap_test_effective_filter', $filter); return $this->result; |