aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests
ModeNameSize
-rw-r--r--ApiTest.php46431logstatsplain
-rw-r--r--CacheTest.php19747logstatsplain
-rw-r--r--CapabilitiesTest.php9451logstatsplain
d---------Collaboration56logstatsplain
d---------Command57logstatsplain
d---------Controller334logstatsplain
-rw-r--r--DeleteOrphanedSharesJobTest.php3911logstatsplain
-rw-r--r--EncryptedSizePropagationTest.php1503logstatsplain
-rw-r--r--EtagPropagationTest.php19768logstatsplain
-rw-r--r--ExpireSharesJobTest.php5353logstatsplain
d---------External127logstatsplain
-rw-r--r--ExternalStorageTest.php3719logstatsplain
-rw-r--r--GroupEtagPropagationTest.php5683logstatsplain
-rw-r--r--HelperTest.php1593logstatsplain
-rw-r--r--LockingTest.php3529logstatsplain
d---------Middleware170logstatsplain
d---------Migration53logstatsplain
-rw-r--r--MountProviderTest.php12379logstatsplain
-rw-r--r--PermissionsTest.php5889logstatsplain
-rw-r--r--PropagationTestCase.php3361logstatsplain
-rw-r--r--ShareTest.php8303logstatsplain
-rw-r--r--SharedMountTest.php14775logstatsplain
-rw-r--r--SharedStorageTest.php20486logstatsplain
-rw-r--r--SizePropagationTest.php4591logstatsplain
-rw-r--r--TestCase.php7682logstatsplain
-rw-r--r--UnshareChildrenTest.php3440logstatsplain
-rw-r--r--UpdaterTest.php7623logstatsplain
-rw-r--r--WatcherTest.php6426logstatsplain
d---------js268logstatsplain
a">invokeLDAPMethod('read', $link, $baseDN, $filter, $attr); } public function search($link, $baseDN, $filter, $attr, $attrsonly = 0, $limit = 0) { return $this->invokeLDAPMethod('search', $link, $baseDN, $filter, $attr, $attrsonly, $limit); } public function setOption($link, $option, $value) { return $this->invokeLDAPMethod('set_option', $link, $option, $value); } public function sort($link, $result, $sortfilter) { return $this->invokeLDAPMethod('sort', $link, $result, $sortfilter); } public function startTls($link) { return $this->invokeLDAPMethod('start_tls', $link); } public function unbind($link) { return $this->invokeLDAPMethod('unbind', $link); } /** * @brief Checks whether the server supports LDAP * @return boolean if it the case, false otherwise * */ public function areLDAPFunctionsAvailable() { return function_exists('ldap_connect'); } /** * @brief Checks whether PHP supports LDAP Paged Results * @return boolean if it the case, false otherwise * */ public function hasPagedResultSupport() { $hasSupport = function_exists('ldap_control_paged_result') && function_exists('ldap_control_paged_result_response'); return $hasSupport; } /** * @brief Checks whether the submitted parameter is a resource * @param $resource the resource variable to check * @return boolean if it is a resource, false otherwise */ public function isResource($resource) { return is_resource($resource); } private function invokeLDAPMethod() { $arguments = func_get_args(); $func = 'ldap_' . array_shift($arguments); if(function_exists($func)) { $this->preFunctionCall($func, $arguments); $result = call_user_func_array($func, $arguments); $this->postFunctionCall(); return $result; } } /** * @param string $functionName */ private function preFunctionCall($functionName, $args) { $this->curFunc = $functionName; $this->curArgs = $args; } private function postFunctionCall() { if($this->isResource($this->curArgs[0])) { $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' && $errorCode === -4) { } else if ($errorCode === 32) { //for now } else if ($errorCode === 10) { //referrals, we switch them off, but then there is AD :) } else { \OCP\Util::writeLog('user_ldap', 'LDAP error '.$errorMsg.' (' . $errorCode.') after calling '. $this->curFunc, \OCP\Util::DEBUG); } } } $this->curFunc = ''; $this->curArgs = array(); } }