Merge remote-tracking branch 'origin/master' into vue
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
/**
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @copyright Copyright (c) 2019 Alexandru Puiu <alexpuiu20@yahoo.com>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
@@ -221,10 +223,10 @@ class ActivityManager {
|
||||
$subject = $ownActivity ? $this->l10n->t('You have added the attachment {attachment} to card {card}') : $this->l10n->t('{user} has added the attachment {attachment} to card {card}');
|
||||
break;
|
||||
case self::SUBJECT_ATTACHMENT_UPDATE:
|
||||
$subject = $ownActivity ? $this->l10n->t('You have updated the attachment {attachment} on card {card}') : $this->l10n->t('{user} has updated the attachment {attachment} to card {card}');
|
||||
$subject = $ownActivity ? $this->l10n->t('You have updated the attachment {attachment} on card {card}') : $this->l10n->t('{user} has updated the attachment {attachment} on card {card}');
|
||||
break;
|
||||
case self::SUBJECT_ATTACHMENT_DELETE:
|
||||
$subject = $ownActivity ? $this->l10n->t('You have deleted the attachment {attachment} from card {card}') : $this->l10n->t('{user} has deleted the attachment {attachment} to card {card}');
|
||||
$subject = $ownActivity ? $this->l10n->t('You have deleted the attachment {attachment} from card {card}') : $this->l10n->t('{user} has deleted the attachment {attachment} from card {card}');
|
||||
break;
|
||||
case self::SUBJECT_ATTACHMENT_RESTORE:
|
||||
$subject = $ownActivity ? $this->l10n->t('You have restored the attachment {attachment} to card {card}') : $this->l10n->t('{user} has restored the attachment {attachment} to card {card}');
|
||||
@@ -384,6 +386,7 @@ class ActivityManager {
|
||||
}
|
||||
if ($subject === self::SUBJECT_CARD_UPDATE_STACKID) {
|
||||
$subjectParams['stackBefore'] = $this->stackMapper->find($additionalParams['before']);
|
||||
$subjectParams['stack'] = $this->stackMapper->find($additionalParams['after']);
|
||||
}
|
||||
|
||||
$subjectParams['author'] = $this->userId;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
/**
|
||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @copyright Copyright (c) 2019 Alexandru Puiu <alexpuiu20@yahoo.com>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
@@ -342,6 +344,13 @@ class DeckProvider implements IProvider {
|
||||
'name' => $subjectParams['after']
|
||||
];
|
||||
}
|
||||
if (array_key_exists('card', $subjectParams) && $event->getSubject() === ActivityManager::SUBJECT_CARD_UPDATE_TITLE) {
|
||||
$params['card'] = [
|
||||
'type' => 'highlight',
|
||||
'id' => $subjectParams['after'],
|
||||
'name' => $subjectParams['after']
|
||||
];
|
||||
}
|
||||
return $params;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,10 +95,7 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
* @param null $offset
|
||||
* @return array
|
||||
*/
|
||||
public function findAllByUser($userId, $limit = null, $offset = null, $since = 0) {
|
||||
$sql = 'SELECT id, title, owner, color, archived, deleted_at, 0 as shared, last_modified FROM `*PREFIX*deck_boards` WHERE owner = ? AND last_modified > ?';
|
||||
$entries = $this->findEntities($sql, [$userId, $since], $limit, $offset);
|
||||
|
||||
public function findAllByUser($userId, $limit = null, $offset = null, $since = -1) {
|
||||
$sql = 'SELECT id, title, owner, color, archived, deleted_at, 0 as shared, last_modified FROM `*PREFIX*deck_boards` WHERE owner = ? AND last_modified > ? UNION ' .
|
||||
'SELECT boards.id, title, owner, color, archived, deleted_at, 1 as shared, last_modified FROM `*PREFIX*deck_boards` as boards ' .
|
||||
'JOIN `*PREFIX*deck_board_acl` as acl ON boards.id=acl.board_id WHERE acl.participant=? AND acl.type=? AND boards.owner != ? AND last_modified > ?';
|
||||
|
||||
@@ -431,7 +431,7 @@ class CardService {
|
||||
$result[$card->getOrder()] = $card;
|
||||
}
|
||||
$this->changeHelper->cardChanged($id, false);
|
||||
return $result;
|
||||
return array_values($result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -345,7 +345,7 @@ class StackService {
|
||||
throw new BadRequestException('order must be provided');
|
||||
}
|
||||
|
||||
$this->permissionService->checkPermission($this->stackMapper, $id, Acl::PERMISSION_EDIT);
|
||||
$this->permissionService->checkPermission($this->stackMapper, $id, Acl::PERMISSION_MANAGE);
|
||||
$stackToSort = $this->stackMapper->find($id);
|
||||
$stacks = $this->stackMapper->findAll($stackToSort->getBoardId());
|
||||
$result = [];
|
||||
|
||||
Reference in New Issue
Block a user