mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Merge branch '3.9' into 3
This commit is contained in:
commit
5282cdc3ed
@ -26,7 +26,8 @@
|
||||
"monolog/monolog": "~1.15",
|
||||
"ptcinc/solr-php-client": "^1.0",
|
||||
"symfony/process": "^3.2 || ^4",
|
||||
"tractorcow/silverstripe-proxy-db": "~0.1"
|
||||
"tractorcow/silverstripe-proxy-db": "~0.1",
|
||||
"ext-curl": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"silverstripe/cms": "^4.0",
|
||||
|
@ -151,12 +151,12 @@ class SearchableService
|
||||
// Anonymous member canView() for indexing
|
||||
if (!$this->classSkipsCanViewCheck($objClass)) {
|
||||
$value = Member::actAs(null, function () use ($obj) {
|
||||
return $obj->canView();
|
||||
return (bool) $obj->canView();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// Current member canView() check for retrieving search results
|
||||
$value = $obj->canView();
|
||||
$value = (bool) $obj->canView();
|
||||
}
|
||||
}
|
||||
$this->extend('updateIsSearchable', $obj, $indexing, $value);
|
||||
|
@ -22,10 +22,14 @@ class WebDAV
|
||||
}
|
||||
|
||||
$ch = self::curl_init($url, 'PROPFIND');
|
||||
|
||||
$res = curl_exec($ch);
|
||||
|
||||
curl_exec($ch);
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
$err = curl_error($ch);
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
if ($code == 404) {
|
||||
return false;
|
||||
}
|
||||
@ -33,8 +37,6 @@ class WebDAV
|
||||
return true;
|
||||
}
|
||||
|
||||
$err = curl_error($ch);
|
||||
|
||||
user_error("Got error from webdav server - " . $err, E_USER_ERROR);
|
||||
}
|
||||
|
||||
@ -42,8 +44,9 @@ class WebDAV
|
||||
{
|
||||
$ch = self::curl_init(rtrim($url, '/') . '/', 'MKCOL');
|
||||
|
||||
$res = curl_exec($ch);
|
||||
curl_exec($ch);
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
return $code == 201;
|
||||
}
|
||||
@ -58,10 +61,12 @@ class WebDAV
|
||||
|
||||
curl_setopt($ch, CURLOPT_INFILE, $handle);
|
||||
|
||||
$res = curl_exec($ch);
|
||||
curl_exec($ch);
|
||||
fclose($handle);
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
return curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
return $code;
|
||||
}
|
||||
|
||||
public static function upload_from_string($string, $url)
|
||||
|
Loading…
Reference in New Issue
Block a user