Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93ec6ce56b | ||
|
|
9164944cb1 | ||
|
|
1443fd24ac | ||
|
|
55004b9309 | ||
|
|
1c74fda2c2 | ||
|
|
2817d8bb43 | ||
|
|
f3b704b56d | ||
|
|
fd0f37e9d6 | ||
|
|
c5d594d602 |
2
.github/workflows/integration.yml
vendored
2
.github/workflows/integration.yml
vendored
@@ -72,7 +72,7 @@ jobs:
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: phpunit
|
||||
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql,
|
||||
extensions: mbstring, gd, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql,
|
||||
coverage: none
|
||||
|
||||
- name: Set up PHPUnit
|
||||
|
||||
2
.github/workflows/phpunit.yml
vendored
2
.github/workflows/phpunit.yml
vendored
@@ -62,7 +62,7 @@ jobs:
|
||||
path: apps/${{ env.APP_NAME }}
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2.18.0
|
||||
uses: shivammathur/setup-php@2.15.0
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: phpunit
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 1.6.7
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix: Detect end of the activity responses (fix #3395) #6518
|
||||
- fix: Avoid conflicts on deck attachments folder name #5705
|
||||
|
||||
## 1.6.6
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
- 🚀 Get your project organized
|
||||
|
||||
</description>
|
||||
<version>1.6.6</version>
|
||||
<version>1.6.7</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Julius Härtl</author>
|
||||
<namespace>Deck</namespace>
|
||||
|
||||
@@ -176,4 +176,12 @@ class ConfigService {
|
||||
|
||||
return $this->config->getUserValue($userId ?? $this->getUserId(), 'deck', 'attachment_folder', '/Deck');
|
||||
}
|
||||
|
||||
public function setAttachmentFolder(?string $userId = null, string $path): void {
|
||||
if ($userId === null && $this->getUserId() === null) {
|
||||
throw new NoPermissionException('Must be logged in get the attachment folder');
|
||||
}
|
||||
|
||||
$this->config->setUserValue($userId ?? $this->getUserId(), 'deck', 'attachment_folder', $path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ use OCA\Deck\Sharing\DeckShareProvider;
|
||||
use OCA\Deck\StatusException;
|
||||
use OCP\AppFramework\Http\StreamResponse;
|
||||
use OCP\Constants;
|
||||
use OCP\Files\Folder;
|
||||
use OCP\Files\IMimeTypeDetector;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\Files\NotFoundException;
|
||||
@@ -189,6 +190,16 @@ class FilesAppService implements IAttachmentService, ICustomAttachmentService {
|
||||
$folder = $userFolder->newFolder($this->configService->getAttachmentFolder());
|
||||
}
|
||||
|
||||
if ($folder->isShared()) {
|
||||
$folderName = $userFolder->getNonExistingName($this->configService->getAttachmentFolder());
|
||||
$folder = $userFolder->newFolder($folderName);
|
||||
$this->configService->setAttachmentFolder($this->userId, $folderName);
|
||||
}
|
||||
|
||||
if (!$folder instanceof Folder || $folder->isShared()) {
|
||||
throw new NotFoundException('No target folder found');
|
||||
}
|
||||
|
||||
$fileName = $folder->getNonExistingName($fileName);
|
||||
$target = $folder->newFile($fileName);
|
||||
$content = fopen($file['tmp_name'], 'rb');
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "deck",
|
||||
"version": "1.6.5",
|
||||
"version": "1.6.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "deck",
|
||||
"description": "",
|
||||
"version": "1.6.6",
|
||||
"version": "1.6.7",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Julius Härtl",
|
||||
@@ -97,4 +97,4 @@
|
||||
"<rootDir>/node_modules/jest-serializer-vue"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,20 @@ export default {
|
||||
params.append('object_id', '' + this.objectId)
|
||||
params.append('limit', ACTIVITY_FETCH_LIMIT)
|
||||
|
||||
const response = await axios.get(generateOcsUrl(`apps/activity/api/v2/activity/${this.filter}`) + '?' + params)
|
||||
const response = await axios.get(
|
||||
generateOcsUrl(`apps/activity/api/v2/activity/${this.filter}`) + '?' + params,
|
||||
{
|
||||
validateStatus: (status) => {
|
||||
return (status >= 200 && status < 300) || status === 304
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
if (response.status === 304) {
|
||||
this.endReached = true
|
||||
return []
|
||||
}
|
||||
|
||||
let activities = response.data.ocs.data
|
||||
if (this.filter === 'deck') {
|
||||
// We need to manually filter activities here, since currently we use two different types and there is no way
|
||||
@@ -95,7 +108,7 @@ export default {
|
||||
})
|
||||
}
|
||||
this.activities.push(...activities)
|
||||
if (response.data.ocs.meta.statuscode === 304 || activities.length === 0) {
|
||||
if (activities.length === 0) {
|
||||
this.endReached = true
|
||||
return []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user