Update TrelloJsonService.php

Fixes the following issue: https://github.com/nextcloud/deck/issues/5136
By fixing the following error when running 'php occ deck:import --system=TrelloJson'

Error: Call to a member function getUID() on string in /home/sites/site100028002/web/nextcloud.enklaave.org/apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:136

and 

Error: Call to a member function getUID() on string in /home/sites/site100028002/web/nextcloud.enklaave.org/apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:364


Signed-off-by: mulles <com.github@emu.lu>
This commit is contained in:
mulles
2024-05-07 20:50:51 +02:00
committed by backportbot[bot]
parent 6d6f79e0ea
commit 9ef9432879

View File

@@ -133,7 +133,7 @@ class TrelloJsonService extends ABoardImportService {
$cardId = $this->cards[$trelloCard->id]->getId();
$comment = new Comment();
if (!empty($this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username})) {
$actor = $this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username}->getUID();
$actor = $this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username};
} else {
$actor = $this->getImportService()->getConfig('owner')->getUID();
}
@@ -361,7 +361,7 @@ class TrelloJsonService extends ABoardImportService {
private function replaceUsernames(string $text): string {
foreach ($this->getImportService()->getConfig('uidRelation') as $trello => $nextcloud) {
$text = str_replace($trello, $nextcloud->getUID(), $text);
$text = str_replace($trello, $nextcloud, $text);
}
return $text;
}