*/
namespace OCA\DAV\SystemTag;
+use OC\SystemTag\SystemTag;
use OCA\DAV\Connector\Sabre\Directory;
use OCA\DAV\Connector\Sabre\Node;
use OCP\IGroupManager;
use OCP\SystemTag\ISystemTagManager;
use OCP\SystemTag\ISystemTagObjectMapper;
use OCP\SystemTag\TagAlreadyExistsException;
+use OCP\Util;
use Sabre\DAV\Exception\BadRequest;
use Sabre\DAV\Exception\Conflict;
use Sabre\DAV\Exception\Forbidden;
if ($user === null) {
return;
}
-
+
$tags = $this->getTagsForFile($node->getId(), $user);
+ usort($tags, function (SystemTag $tagA, SystemTag $tagB): int {
+ return Util::naturalSortCompare($tagA->getName(), $tagB->getName());
+ });
return new SystemTagList($tags, $this->tagManager, $user);
});
}