@@ -265,7 +265,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
|
||||
public function findOverdue() {
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$qb->select('id','title','duedate','notified')
|
||||
$qb->select('id', 'title', 'duedate', 'notified')
|
||||
->from('deck_cards')
|
||||
->where($qb->expr()->lt('duedate', $qb->createFunction('NOW()')))
|
||||
->andWhere($qb->expr()->eq('notified', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
|
||||
@@ -276,7 +276,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
|
||||
public function findUnexposedDescriptionChances() {
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$qb->select('id','title','duedate','notified','description_prev','last_editor','description')
|
||||
$qb->select('id', 'title', 'duedate', 'notified', 'description_prev', 'last_editor', 'description')
|
||||
->from('deck_cards')
|
||||
->where($qb->expr()->isNotNull('last_editor'))
|
||||
->andWhere($qb->expr()->isNotNull('description_prev'));
|
||||
|
||||
@@ -33,6 +33,6 @@ use OCP\Search\SearchResultEntry;
|
||||
|
||||
class CardSearchResultEntry extends SearchResultEntry {
|
||||
public function __construct(Board $board, Stack $stack, Card $card, $urlGenerator) {
|
||||
parent::__construct('', $card->getTitle(), $board->getTitle() . ' » ' . $stack->getTitle() , $urlGenerator->linkToRouteAbsolute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $card->getId(), 'icon-deck');
|
||||
parent::__construct('', $card->getTitle(), $board->getTitle() . ' » ' . $stack->getTitle(), $urlGenerator->linkToRouteAbsolute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $card->getId(), 'icon-deck');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ class OverviewService {
|
||||
private function findAllBoardsFromUser(string $userId): array {
|
||||
$userInfo = $this->getBoardPrerequisites($userId);
|
||||
$userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null);
|
||||
$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null);
|
||||
$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'], null, null);
|
||||
$circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null);
|
||||
return array_unique(array_merge($userBoards, $groupBoards, $circleBoards));
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ class DeckShareProvider implements \OCP\Share\IShareProvider {
|
||||
);
|
||||
}
|
||||
|
||||
$qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
|
||||
$qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
|
||||
$qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId())));
|
||||
|
||||
$qb->orderBy('s.id');
|
||||
|
||||
@@ -65,10 +65,10 @@ class AclMapperTest extends MapperTestUtility {
|
||||
$this->boardMapper->insert($this->getBoard('MyBoard 3', 'user3'))
|
||||
];
|
||||
$this->acls = [
|
||||
$this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[1]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user','user2', true, false, false, $this->boards[0]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user','user3', true, true, false, $this->boards[0]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[2]->getId()))
|
||||
$this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[1]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user', 'user2', true, false, false, $this->boards[0]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user', 'user3', true, true, false, $this->boards[0]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[2]->getId()))
|
||||
];
|
||||
|
||||
foreach ($this->acls as $acl) {
|
||||
|
||||
@@ -74,10 +74,10 @@ class BoardMapperTest extends MapperTestUtility {
|
||||
$this->boardMapper->insert($this->getBoard('MyBoard 3', 'user3'))
|
||||
];
|
||||
$this->acls = [
|
||||
$this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[1]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user','user2', true, false, false, $this->boards[0]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user','user3', true, true, false, $this->boards[0]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[2]->getId()))
|
||||
$this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[1]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user', 'user2', true, false, false, $this->boards[0]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user', 'user3', true, true, false, $this->boards[0]->getId())),
|
||||
$this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[2]->getId()))
|
||||
];
|
||||
|
||||
foreach ($this->acls as $acl) {
|
||||
|
||||
@@ -176,9 +176,9 @@ class AttachmentServiceTest extends TestCase {
|
||||
public function testFindAll() {
|
||||
$this->mockPermission(Acl::PERMISSION_READ);
|
||||
$attachments = [
|
||||
$this->createAttachment('deck_file','file1'),
|
||||
$this->createAttachment('deck_file','file2'),
|
||||
$this->createAttachment('deck_file_invalid','file3'),
|
||||
$this->createAttachment('deck_file', 'file1'),
|
||||
$this->createAttachment('deck_file', 'file2'),
|
||||
$this->createAttachment('deck_file_invalid', 'file3'),
|
||||
];
|
||||
$this->attachmentMapper->expects($this->once())
|
||||
->method('findAll')
|
||||
@@ -197,14 +197,14 @@ class AttachmentServiceTest extends TestCase {
|
||||
public function testFindAllWithDeleted() {
|
||||
$this->mockPermission(Acl::PERMISSION_READ);
|
||||
$attachments = [
|
||||
$this->createAttachment('deck_file','file1'),
|
||||
$this->createAttachment('deck_file','file2'),
|
||||
$this->createAttachment('deck_file_invalid','file3'),
|
||||
$this->createAttachment('deck_file', 'file1'),
|
||||
$this->createAttachment('deck_file', 'file2'),
|
||||
$this->createAttachment('deck_file_invalid', 'file3'),
|
||||
];
|
||||
$attachmentsDeleted = [
|
||||
$this->createAttachment('deck_file','file4'),
|
||||
$this->createAttachment('deck_file','file5'),
|
||||
$this->createAttachment('deck_file_invalid','file6'),
|
||||
$this->createAttachment('deck_file', 'file4'),
|
||||
$this->createAttachment('deck_file', 'file5'),
|
||||
$this->createAttachment('deck_file_invalid', 'file6'),
|
||||
];
|
||||
$this->attachmentMapper->expects($this->once())
|
||||
->method('findAll')
|
||||
|
||||
@@ -98,11 +98,11 @@ class CardControllerTest extends TestCase {
|
||||
}
|
||||
public function testAssignLabel() {
|
||||
$this->cardService->expects($this->once())->method('assignLabel');
|
||||
$this->controller->assignLabel(1,2);
|
||||
$this->controller->assignLabel(1, 2);
|
||||
}
|
||||
public function testRemoveLabel() {
|
||||
$this->cardService->expects($this->once())->method('removeLabel');
|
||||
$this->controller->removeLabel(1,2);
|
||||
$this->controller->removeLabel(1, 2);
|
||||
}
|
||||
|
||||
public function testReorder() {
|
||||
|
||||
Reference in New Issue
Block a user