Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/dav/lib/SystemTag/SystemTagList.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/
namespace OCA\DAV\SystemTag;

use OC\SystemTag\SystemTag;
use OCP\IUser;
use OCP\SystemTag\ISystemTag;
use OCP\SystemTag\ISystemTagManager;
Expand Down Expand Up @@ -58,6 +59,10 @@ public static function xmlDeserialize(Reader $reader): void {
}

public function xmlSerialize(Writer $writer): void {
usort($this->tags, function(SystemTag $a, SystemTag $b) {
return strnatcmp($a->getName(), $b->getName());
});
Comment on lines +62 to +64

Check notice

Code scanning / Psalm

ArgumentTypeCoercion

Type OCP\SystemTag\ISystemTag should be a subtype of OC\SystemTag\SystemTag

foreach ($this->tags as $tag) {
$writer->startElement('{' . self::NS_NEXTCLOUD . '}system-tag');
$writer->writeAttributes([
Expand Down