mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(dav): Adapt changes to stable28 code
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
d04ef20e4b
commit
4cfc6e76a9
1 changed files with 3 additions and 2 deletions
|
|
@ -30,6 +30,7 @@ use OCA\DAV\Connector\Sabre\Directory;
|
|||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\IUser;
|
||||
use Sabre\DAV\Exception as DavException;
|
||||
use Sabre\DAV\PropertyStorage\Backend\BackendInterface;
|
||||
use Sabre\DAV\PropFind;
|
||||
use Sabre\DAV\PropPatch;
|
||||
|
|
@ -373,7 +374,7 @@ class CustomPropertiesBackend implements BackendInterface {
|
|||
->executeStatement();
|
||||
}
|
||||
} else {
|
||||
[$value, $valueType] = $this->encodeValueForDatabase($propertyValue);
|
||||
[$value, $valueType] = $this->encodeValueForDatabase($propertyName, $propertyValue);
|
||||
$dbParameters['propertyValue'] = $value;
|
||||
$dbParameters['valueType'] = $valueType;
|
||||
|
||||
|
|
@ -431,7 +432,7 @@ class CustomPropertiesBackend implements BackendInterface {
|
|||
* @param mixed $value
|
||||
* @return array
|
||||
*/
|
||||
private function encodeValueForDatabase($value): array {
|
||||
private function encodeValueForDatabase(string $name, $value): array {
|
||||
if (is_scalar($value)) {
|
||||
$valueType = self::PROPERTY_TYPE_STRING;
|
||||
} elseif ($value instanceof Complex) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue