Skip to content

Commit

Permalink
Merge pull request #2537 from nextcloud/backport/2533/stable28
Browse files Browse the repository at this point in the history
[stable28] feat: Handle complex location type
  • Loading branch information
artonge authored Jul 8, 2024
2 parents d704c3f + d014471 commit 1828dea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.2']
server-versions: ['master']
server-versions: ['stable28']

services:
oracle:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.2']
server-versions: ['master']
server-versions: ['stable28']

services:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.2']
server-versions: ['master']
server-versions: ['stable28']

steps:
- name: Set app env
Expand Down
5 changes: 5 additions & 0 deletions lib/Sabre/PropFindPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
});
Expand Down

0 comments on commit 1828dea

Please sign in to comment.