Moar work
This commit is contained in:
@@ -51,7 +51,13 @@ class BoardMapper extends Mapper {
|
||||
*/
|
||||
public function findAll($userId, $limit=null, $offset=null) {
|
||||
$sql = 'SELECT * FROM `*PREFIX*deck_boards` WHERE `owner` = ? ORDER BY `title`';
|
||||
return $this->findEntities($sql, [$userId], $limit, $offset);
|
||||
$entries = $this->findEntities($sql, [$userId], $limit, $offset);
|
||||
/* @var Board $entry */
|
||||
foreach ($entries as $entry) {
|
||||
$acl = $this->aclMapper->findAll($entry->id);
|
||||
$entry->setAcl($acl);
|
||||
}
|
||||
return $entries;
|
||||
}
|
||||
|
||||
public function delete(\OCP\AppFramework\Db\Entity $entity) {
|
||||
|
||||
@@ -14,7 +14,7 @@ class LabelMapper extends DeckMapper {
|
||||
}
|
||||
|
||||
public function findAll($boardId, $limit=null, $offset=null) {
|
||||
$sql = 'SELECT * FROM `*PREFIX*deck_labels` WHERE `board_id` = ?';
|
||||
$sql = 'SELECT * FROM `*PREFIX*deck_labels` WHERE `board_id` = ? ORDER BY `id`';
|
||||
return $this->findEntities($sql, [$boardId], $limit, $offset);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user