Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nextcloud/server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9ebbe1f45f1cc72864f9c18111111808ea1695d0
Choose a base ref
..
head repository: nextcloud/server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3a1bb8bccc39d5f8cb2e7806aa0c53596ec31084
Choose a head ref
Showing with 347 additions and 295 deletions.
  1. +7 −6 apps/files/src/views/TemplatePicker.vue
  2. +3 −2 apps/files_sharing/lib/Scanner.php
  3. +4 −2 apps/files_sharing/tests/External/ScannerTest.php
  4. +1 −1 apps/settings/css/settings.css
  5. +1 −1 apps/settings/css/settings.css.map
  6. +4 −0 apps/settings/css/settings.scss
  7. +2 −0 apps/settings/src/admin.js
  8. +1 −1 apps/settings/templates/settings/admin/sharing.php
  9. +30 −29 apps/workflowengine/src/components/Check.vue
  10. +49 −41 apps/workflowengine/src/components/Checks/FileMimeType.vue
  11. +5 −3 apps/workflowengine/src/components/Checks/RequestTime.vue
  12. +40 −35 apps/workflowengine/src/components/Checks/RequestURL.vue
  13. +36 −44 apps/workflowengine/src/components/Checks/RequestUserAgent.vue
  14. +7 −7 apps/workflowengine/src/components/Checks/RequestUserGroup.vue
  15. +7 −3 apps/workflowengine/src/components/Rule.vue
  16. +2 −2 dist/core-common.js
  17. +1 −1 dist/core-common.js.map
  18. +2 −2 dist/files-main.js
  19. +1 −1 dist/files-main.js.map
  20. +2 −2 dist/settings-legacy-admin.js
  21. +1 −1 dist/settings-legacy-admin.js.map
  22. +2 −2 dist/workflowengine-workflowengine.js
  23. +1 −1 dist/workflowengine-workflowengine.js.map
  24. +1 −1 lib/composer/composer/autoload_classmap.php
  25. +1 −1 lib/composer/composer/autoload_static.php
  26. +10 −7 lib/private/Files/Cache/Scanner.php
  27. +0 −81 lib/private/Files/ObjectStore/NoopScanner.php
  28. +98 −0 lib/private/Files/ObjectStore/ObjectStoreScanner.php
  29. +2 −2 lib/private/Files/ObjectStore/ObjectStoreStorage.php
  30. +26 −16 tests/lib/Files/ObjectStore/{NoopScannerTest.php → ObjectStoreScannerTest.php}
13 changes: 7 additions & 6 deletions apps/files/src/views/TemplatePicker.vue
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
<NcModal v-if="opened"
:clear-view-delay="-1"
class="templates-picker"
size="normal"
size="large"
@close="close">
<form class="templates-picker__form"
:style="style"
@@ -47,9 +47,6 @@

<!-- Cancel and submit -->
<div class="templates-picker__buttons">
<button @click="close">
{{ t('files', 'Cancel') }}
</button>
<input type="submit"
class="primary"
:value="t('files', 'Create')"
@@ -75,7 +72,6 @@ import TemplatePreview from '../components/TemplatePreview.vue'

const border = 2
const margin = 8
const width = margin * 20

export default {
name: 'TemplatePicker',
@@ -136,6 +132,11 @@ export default {
* @return {object}
*/
style() {
// Fallback to 16:9 landscape ratio
const ratio = this.provider.ratio ? this.provider.ratio : 1.77
// Landscape templates should be wider than tall ones
// We fit 3 templates per row at max for landscape and 4 for portrait
const width = ratio > 1 ? margin * 30 : margin * 20
return {
'--margin': margin + 'px',
'--width': width + 'px',
@@ -275,7 +276,7 @@ export default {

&__buttons {
display: flex;
justify-content: space-between;
justify-content: end;
padding: calc(var(--margin) * 2) var(--margin);
position: sticky;
bottom: 0;
5 changes: 3 additions & 2 deletions apps/files_sharing/lib/Scanner.php
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@

namespace OCA\Files_Sharing;

use OC\Files\ObjectStore\NoopScanner;
use OC\Files\ObjectStore\ObjectStoreScanner;

/**
* Scanner for SharedStorage
@@ -72,7 +72,8 @@ private function getSourceScanner() {

public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true, $data = null) {
$sourceScanner = $this->getSourceScanner();
if ($sourceScanner instanceof NoopScanner) {
if ($sourceScanner instanceof ObjectStoreScanner) {
// ObjectStoreScanner doesn't scan
return [];
} else {
return parent::scanFile($file, $reuseExisting, $parentId, $cacheData, $lock);
6 changes: 4 additions & 2 deletions apps/files_sharing/tests/External/ScannerTest.php
Original file line number Diff line number Diff line change
@@ -26,9 +26,11 @@
use OCA\Files_Sharing\External\Scanner;
use Test\TestCase;

/**
* @group DB
*/
class ScannerTest extends TestCase {
/** @var \OCA\Files_Sharing\External\Scanner */
protected $scanner;
protected Scanner $scanner;
/** @var \OCA\Files_Sharing\External\Storage|\PHPUnit\Framework\MockObject\MockObject */
protected $storage;
/** @var \OC\Files\Cache\Cache|\PHPUnit\Framework\MockObject\MockObject */
Loading