зеркало из https://github.com/nextcloud/deck.git
Properly check for available data (fixes #921)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Родитель
7e8f4c83b3
Коммит
9516c7578b
|
@ -302,6 +302,8 @@ class ActivityManager {
|
||||||
try {
|
try {
|
||||||
$object = $this->findObjectForEntity($objectType, $entity);
|
$object = $this->findObjectForEntity($objectType, $entity);
|
||||||
} catch (DoesNotExistException $e) {
|
} catch (DoesNotExistException $e) {
|
||||||
|
\OC::$server->getLogger()->error('Could not create activity entry for ' . $subject . '. Entity not found.', $entity);
|
||||||
|
return null;
|
||||||
} catch (MultipleObjectsReturnedException $e) {
|
} catch (MultipleObjectsReturnedException $e) {
|
||||||
\OC::$server->getLogger()->error('Could not create activity entry for ' . $subject . '. Entity not found.', $entity);
|
\OC::$server->getLogger()->error('Could not create activity entry for ' . $subject . '. Entity not found.', $entity);
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -104,7 +104,7 @@ class DeckProvider implements IProvider {
|
||||||
];
|
];
|
||||||
$event->setAuthor($author);
|
$event->setAuthor($author);
|
||||||
if ($event->getObjectType() === ActivityManager::DECK_OBJECT_BOARD) {
|
if ($event->getObjectType() === ActivityManager::DECK_OBJECT_BOARD) {
|
||||||
if ($event->getObjectName() === '') {
|
if (isset($subjectParams['board']) && $event->getObjectName() === '') {
|
||||||
$event->setObject($event->getObjectType(), $event->getObjectId(), $subjectParams['board']['title']);
|
$event->setObject($event->getObjectType(), $event->getObjectId(), $subjectParams['board']['title']);
|
||||||
}
|
}
|
||||||
$board = [
|
$board = [
|
||||||
|
@ -116,7 +116,7 @@ class DeckProvider implements IProvider {
|
||||||
$params['board'] = $board;
|
$params['board'] = $board;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($event->getObjectType() === ActivityManager::DECK_OBJECT_CARD) {
|
if (isset($subjectParams['card']) && $event->getObjectType() === ActivityManager::DECK_OBJECT_CARD) {
|
||||||
if ($event->getObjectName() === '') {
|
if ($event->getObjectName() === '') {
|
||||||
$event->setObject($event->getObjectType(), $event->getObjectId(), $subjectParams['card']['title']);
|
$event->setObject($event->getObjectType(), $event->getObjectId(), $subjectParams['card']['title']);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче