From 8773bd6400784bce1476ec426f183038f49e1a7f Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Mon, 8 Jul 2024 13:58:15 +0200 Subject: [PATCH 1/2] feat: Handle complex location type Signed-off-by: Louis Chemineau --- lib/Sabre/PropFindPlugin.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Sabre/PropFindPlugin.php b/lib/Sabre/PropFindPlugin.php index 35c8e581e..adbf0a46e 100644 --- a/lib/Sabre/PropFindPlugin.php +++ b/lib/Sabre/PropFindPlugin.php @@ -40,6 +40,7 @@ use Sabre\DAV\Server; use Sabre\DAV\ServerPlugin; use Sabre\DAV\Tree; +use Sabre\DAV\Xml\Property\Complex; class PropFindPlugin extends ServerPlugin { public const ORIGINAL_NAME_PROPERTYNAME = '{http://nextcloud.org/ns}original-name'; @@ -145,6 +146,10 @@ public function handleUpdateProperties($path, PropPatch $propPatch): void { $node = $this->tree->getNodeForPath($path); if ($node instanceof AlbumRoot) { $propPatch->handle(self::LOCATION_PROPERTYNAME, function ($location) use ($node) { + if ($location instanceof Complex) { + $location = $location->getXml(); + } + $this->albumMapper->setLocation($node->getAlbum()->getAlbum()->getId(), $location); return true; }); From d0144713daff1d90e9282bf3ec02a9ecb0b7a1d9 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Mon, 8 Jul 2024 18:40:48 +0200 Subject: [PATCH 2/2] fix: Test against stable28 in phpunit CI Signed-off-by: Louis Chemineau --- .github/workflows/phpunit-mysql.yml | 2 +- .github/workflows/phpunit-oci.yml | 2 +- .github/workflows/phpunit-pgsql.yml | 2 +- .github/workflows/phpunit-sqlite.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index b7029d512..cd1188ce4 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -48,7 +48,7 @@ jobs: strategy: matrix: php-versions: ['8.0', '8.1', '8.2', '8.3'] - server-versions: ['master'] + server-versions: ['stable28'] mysql-versions: ['8.1'] name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index e1ae20327..3e4827e5b 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -48,7 +48,7 @@ jobs: strategy: matrix: php-versions: ['8.2'] - server-versions: ['master'] + server-versions: ['stable28'] services: oracle: diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index 45a82163e..0b0f6c116 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -48,7 +48,7 @@ jobs: strategy: matrix: php-versions: ['8.2'] - server-versions: ['master'] + server-versions: ['stable28'] services: postgres: diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index ed1151ab9..4600aa000 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -48,7 +48,7 @@ jobs: strategy: matrix: php-versions: ['8.2'] - server-versions: ['master'] + server-versions: ['stable28'] steps: - name: Set app env