summaryrefslogtreecommitdiffstats
path: root/lib/Sabre/Album/PropFindPlugin.php
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2022-09-26 17:19:59 +0200
committerLouis Chemineau <louis@chmn.me>2022-10-10 12:23:52 +0200
commite88d44909dc36960f484474fe05dd1e69a5bbb73 (patch)
treec46b2af5f4046f4565eca10e038548ef0c8a0eb1 /lib/Sabre/Album/PropFindPlugin.php
parenta7979d22ab4fcba25cd29fc094a4d7ce644a0733 (diff)
Revert "Display album's name instead of token"
This reverts commit 2de383f22f04d82c14696f4f084c0e2c592d3d1f. Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'lib/Sabre/Album/PropFindPlugin.php')
-rw-r--r--lib/Sabre/Album/PropFindPlugin.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sabre/Album/PropFindPlugin.php b/lib/Sabre/Album/PropFindPlugin.php
index 3311b43e..b716ca34 100644
--- a/lib/Sabre/Album/PropFindPlugin.php
+++ b/lib/Sabre/Album/PropFindPlugin.php
@@ -37,6 +37,7 @@ use Sabre\DAV\Tree;
use OCP\Files\NotFoundException;
class PropFindPlugin extends ServerPlugin {
+ public const ORIGINAL_NAME_PROPERTYNAME = '{http://nextcloud.org/ns}original-name';
public const FILE_NAME_PROPERTYNAME = '{http://nextcloud.org/ns}file-name';
public const FAVORITE_PROPERTYNAME = '{http://owncloud.org/ns}favorite';
public const DATE_RANGE_PROPERTYNAME = '{http://nextcloud.org/ns}dateRange';
@@ -110,6 +111,7 @@ class PropFindPlugin extends ServerPlugin {
}
if ($node instanceof AlbumRoot) {
+ $propFind->handle(self::ORIGINAL_NAME_PROPERTYNAME, fn () => $node->getAlbum()->getAlbum()->getTitle());
$propFind->handle(self::LAST_PHOTO_PROPERTYNAME, fn () => $node->getAlbum()->getAlbum()->getLastAddedPhoto());
$propFind->handle(self::NBITEMS_PROPERTYNAME, fn () => count($node->getChildren()));
$propFind->handle(self::LOCATION_PROPERTYNAME, fn () => $node->getAlbum()->getAlbum()->getLocation());