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:
@@ -116,7 +116,7 @@ class TrelloJsonService extends ABoardImportService {
|
|||||||
$cardId = $this->cards[$trelloCard->id]->getId();
|
$cardId = $this->cards[$trelloCard->id]->getId();
|
||||||
$comment = new Comment();
|
$comment = new Comment();
|
||||||
if (!empty($this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username})) {
|
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 {
|
} else {
|
||||||
$actor = $this->getImportService()->getConfig('owner')->getUID();
|
$actor = $this->getImportService()->getConfig('owner')->getUID();
|
||||||
}
|
}
|
||||||
@@ -344,7 +344,7 @@ class TrelloJsonService extends ABoardImportService {
|
|||||||
|
|
||||||
private function replaceUsernames(string $text): string {
|
private function replaceUsernames(string $text): string {
|
||||||
foreach ($this->getImportService()->getConfig('uidRelation') as $trello => $nextcloud) {
|
foreach ($this->getImportService()->getConfig('uidRelation') as $trello => $nextcloud) {
|
||||||
$text = str_replace($trello, $nextcloud->getUID(), $text);
|
$text = str_replace($trello, $nextcloud, $text);
|
||||||
}
|
}
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user