Skip to content

Commit

Permalink
Merge pull request #23112 from owncloud/backport-23086-stable9
Browse files Browse the repository at this point in the history
[9.0] remove deprecated ldap_sort
  • Loading branch information
DeepDiver1975 committed Mar 14, 2016
2 parents efa6731 + 38d137c commit cf232c4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 30 deletions.
8 changes: 0 additions & 8 deletions apps/user_ldap/lib/access.php
Expand Up @@ -1025,14 +1025,6 @@ private function search($filter, $base, $attr = null, $limit = null, $offset = n
return array();
}

// Do the server-side sorting
foreach(array_reverse($attr) as $sortAttr){
foreach($sr as $searchResource) {
$this->ldap->sort($cr, $searchResource, $sortAttr);
}
}


foreach($sr as $res) {
$findings = array_merge($findings, $this->ldap->getEntries($cr , $res ));
}
Expand Down
8 changes: 0 additions & 8 deletions apps/user_ldap/lib/ildapwrapper.php
Expand Up @@ -178,14 +178,6 @@ public function setOption($link, $option, $value);
*/
public function startTls($link);

/**
* Sort the result of a LDAP search
* @param resource $link LDAP link resource
* @param resource $result LDAP result resource
* @param string $sortFilter attribute to use a key in sort
*/
public function sort($link, $result, $sortFilter);

/**
* Unbind from LDAP directory
* @param resource $link LDAP link resource
Expand Down
15 changes: 1 addition & 14 deletions apps/user_ldap/lib/ldap.php
Expand Up @@ -200,16 +200,6 @@ public function setOption($link, $option, $value) {
return $this->invokeLDAPMethod('set_option', $link, $option, $value);
}

/**
* @param LDAP $link
* @param LDAP $result
* @param string $sortFilter
* @return mixed
*/
public function sort($link, $result, $sortFilter) {
return $this->invokeLDAPMethod('sort', $link, $result, $sortFilter);
}

/**
* @param LDAP $link
* @return mixed|true
Expand Down Expand Up @@ -283,10 +273,7 @@ private function postFunctionCall() {
$errorCode = ldap_errno($this->curArgs[0]);
$errorMsg = ldap_error($this->curArgs[0]);
if($errorCode !== 0) {
if($this->curFunc === 'ldap_sort' && $errorCode === -4) {
//You can safely ignore that decoding error.
//… says https://bugs.php.net/bug.php?id=18023
} else if($this->curFunc === 'ldap_get_entries'
if($this->curFunc === 'ldap_get_entries'
&& $errorCode === -4) {
} else if ($errorCode === 32) {
//for now
Expand Down

0 comments on commit cf232c4

Please sign in to comment.