Commit Graph

56423 Commits

Author SHA1 Message Date
Vincent Petry 97c11ff48b Fix more tests in the Core subdir
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-24 12:38:44 +00:00
Vincent Petry acfffcc685 Fix core tests command for app enabling/disabling
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-24 12:38:43 +00:00
Vincent Petry 74447816a4 Fix casing of core test folder
It seems Phpunit < 9 was case insensitive.
Fixed the phpunit config to target the correct name for the "Core" test
directory.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-24 12:38:42 +00:00
John Molakvoæ (skjnldsv) dfcf6ad106 Catch invalid cache source storage path
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-03-24 11:05:32 +00:00
Nextcloud bot c555e86e63
[tx-robot] updated from transifex 2021-03-24 02:25:25 +00:00
Robin Appelman 4bbf7058af
update icewind/smb to 3.4.0
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23 19:08:48 +01:00
Nextcloud bot 1c9904aafc
[tx-robot] updated from transifex 2021-03-23 02:24:24 +00:00
Daniel Calviño Sánchez 24d853e754 Add OCC command to reset rendered texts
The command is meant to be used when the fonts used to render texts
("core/fonts/NotoSans-Regular.ttf" and "core/fonts/NotoSans-Bold.ttf")
are changed (for example, to add support for other scripts). The avatar
and text file previews will be removed, so they will be generated again
with the updated font when needed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-22 20:09:43 +00:00
Daniel Calviño Sánchez 6997e6f755 Include additional scripts in Noto fonts
Generated avatars as well as text file previews are rendered using the
"core/fonts/NotoSans-Regular.ttf" font. The file was the standard hinted
"NotoSans-Regular.ttf" file from https://www.google.com/get/noto/.
However that file does not cover some non LGC (Latin, Greek, Cyrillic)
scripts, like Arabic, Devanagari or Hebrew, to name a few.

Markdown file previews also use "core/fonts/NotoSans-Bold.ttf", which is
in the same situation as the regular one.

Due to limitations in the TTF format it is not possible to provide a
single file for each style that includes all Noto fonts. However, it is
possible to add more scripts to the standard "NotoSans-Regular.ttf" and
"NotoSans-Bold.ttf" files (although no CJK (Chinese, Japanese, Korean)
glyph can be included due to the aforementioned limitations).

This commit replaces the standard files with an extended version created
using the Noto Tools. The build script (as well as a patch for the Noto
Tools) is also included for reference and to be able to update the font
files in the future if needed.

Due to the additional scripts added the font files are now much larger,
although this does not seem to increase the time spent rendering LGC
scripts.

Note that the file for the bold style still contains less scripts than
the regular one, as not all scripts supported by Noto have a bold
weight.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-22 20:09:42 +00:00
John Molakvoæ 7d8aede6dc
Merge pull request #26239 from nextcloud/backport/26231/stable20 2021-03-22 13:55:29 +01:00
Valdnet 70e89e44ec l10n: Add changes to text string for user 2021-03-22 10:30:52 +00:00
Valdnet 68a707c158 l10n: Add word user in ShareByMailProvider.php
Standardizing text strings with other Nextcloud applications.
2021-03-22 10:30:51 +00:00
Nextcloud bot 208f84d2e4
[tx-robot] updated from transifex 2021-03-22 02:24:06 +00:00
Nextcloud bot efdb5cc53c
[tx-robot] updated from transifex 2021-03-21 02:23:27 +00:00
Roeland Jago Douma 7b294aee0d
Merge pull request #26217 from nextcloud/backport/26145/stable20
[stable20] add (hidden) option to always show smb root as writable
2021-03-20 10:53:48 +01:00
Nextcloud bot 01d05c6435
[tx-robot] updated from transifex 2021-03-20 02:24:00 +00:00
Morris Jobke 019ccda25f
Merge pull request #26209 from nextcloud/backport/23718/stable20
[stable20] expand 'path is already shared' error message
2021-03-19 20:04:07 +01:00
Robin Appelman fd29d77817
expand 'path is already shared' error message
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-19 17:32:14 +01:00
Robin Appelman 728488fcf5 add (hidden) option to always show smb root as writable
some smb servers are very insistent in reporting that the root of the share is readonly, even if it isn't.

This works around the problem by adding a hidden option to overwrite the permissions of the root of the share.

This can be enabled using

```bash
occ files_external:config <mount id> root_force_writable true
```

where you can find your mount id using

```bash
occ files_external:list
```

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-19 15:47:23 +00:00
Morris Jobke 37c3930f72
Merge pull request #26205 from nextcloud/backport/26200/stable20
[stable20] Update user share must use correct expiration validation
2021-03-19 15:19:30 +01:00
Vincent Petry 4ad89c1761 Update user share must use correct expiration validation
Updating a user or group share now uses the correct method for the
validation of the expiration date. Instead of using the one from links
it uses the one for internal shares.

To avoid future confusion, the method "validateExpirationDate" has been
renamed to "validateExpirationDateLink".

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-19 09:57:29 +00:00
Morris Jobke f088b942cb
Merge pull request #26125 from nextcloud/backport/25533/stable20
[stable20] send share notification instead of erroring on duplicate share
2021-03-19 09:19:14 +01:00
Nextcloud bot 97d9b3fe0c
[tx-robot] updated from transifex 2021-03-19 02:25:14 +00:00
Morris Jobke ffc4efb894
Merge pull request #26063 from nextcloud/backport/25915/stable20
[stable20] Add appconfig to always show the unique label of a sharee
2021-03-18 20:50:01 +01:00
Roeland Jago Douma 4e617bedda
Merge pull request #26123 from nextcloud/backport/26004/stable20
[stable20] Allow overwriting isAuthenticated
2021-03-18 16:20:37 +01:00
Julius Härtl 96287f336e Add appconfig to always show the unique label of a sharee
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
2021-03-18 13:07:03 +00:00
Morris Jobke 939db1f466
Merge pull request #26190 from nextcloud/backport/25331/stable20
[stable20] Fix valid storages removed when cleaning remote storages
2021-03-18 13:09:22 +01:00
Vincent Petry 7dfb3afdac
Merge pull request #26088 from nextcloud/backport/26049/stable20
[stable20] limit constructing of result objects in file search
2021-03-18 11:22:53 +01:00
Daniel Calviño Sánchez ec454e7c2b Fix valid storages removed when cleaning remote storages
The remote URL of a share is always stored in the database with a
trailing slash. However, when a cloud ID is generated trailing slashes
are removed.

The ID of a remote storage is generated from the cloud ID, but the
"cleanup-remote-storage" command directly used the remote URL stored in
the database. Due to this, even if the remote storage was valid, its ID
did not match the ID of the remote share generated by the command and
ended being removed.

Now the command generates the ID of remote shares using the cloud ID
instead, just like done by the remote storage, so there is no longer a
mismatch.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-18 07:59:45 +00:00
Daniel Calviño Sánchez 92daa942b0 Add integration tests for "sharing:cleanup-remote-storages" OCC command
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-18 07:59:45 +00:00
Robin Appelman e36e4a571e
implement PagedProvider for file search
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-18 08:22:34 +01:00
Robin Appelman 57042ab107
limit constructing of result objects in file search
even thought we currently have no proper way of limiting the search itself, we can at least limit the construction of the result objects.

this saves about 40% of the time spend in the search request in my local testing

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-18 08:22:31 +01:00
Nextcloud bot a50f4a42bc
[tx-robot] updated from transifex 2021-03-18 02:25:22 +00:00
Morris Jobke d3b279d98d
Merge pull request #26052 from nextcloud/backport/26048/stable20
[stable20] cache baseurl in url generator
2021-03-17 20:14:05 +01:00
Morris Jobke 4f18ff9815
Merge pull request #25944 from nextcloud/backport/25659/stable20
[stable20] catch notfound and forbidden exception in smb::getmetadata
2021-03-17 20:13:57 +01:00
Morris Jobke 71b793f8a1
Merge pull request #26091 from nextcloud/backport/25722/stable20
[stable20] apply object store copy optimization when 'cross storage' copy is wit…
2021-03-17 20:09:56 +01:00
Morris Jobke c4da8d4e55
Merge pull request #26152 from nextcloud/backport/26137/stable20
[stable20] dont allow creating users with __groupfolders as uid
2021-03-17 20:06:56 +01:00
Morris Jobke 2982fa346b
Merge pull request #26181 from nextcloud/backport/26003/stable20
[stable20] Add getID function to the simplefile implementation
2021-03-17 20:06:15 +01:00
Morris Jobke fe3b3a9cec
Merge pull request #26147 from nextcloud/backport/26013/stable20
[stable20] Return the fileid from `copyFromCache` and use it instead of doing an extra query
2021-03-17 20:04:11 +01:00
Roeland Jago Douma 147134fc31 Add getID function to the simplefile implementation
Sometimes it is useful to get the actual fileid

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-17 16:15:46 +00:00
Morris Jobke 3c1402c2d9
Merge pull request #25876 from nextcloud/psalm/stable20/update
[stable20] Update psalm baseline
2021-03-17 14:17:20 +01:00
Morris Jobke fd53468d7b
Merge pull request #26163 from nextcloud/backport/26153/stable20
[stable20] Use correct exception type hint in catch statement
2021-03-17 13:50:13 +01:00
Morris Jobke 94c47eddea
Merge pull request #26168 from nextcloud/backport/26072/stable20
[stable20] remove explicit fclose from S3->writeStream
2021-03-17 13:46:48 +01:00
Vincent Petry 67e0b194b6
Update and fix baseline
Backported some bits of stable21 to make Psalm happy.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-17 12:04:08 +01:00
Robin Appelman 534a935433 remove explicit fclose from S3->writeStream
streams get closed automatically when dropped, and in some cases the stream seems to be already closed by the S3 library, in which case trying to close it again will raise an error

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-17 09:36:11 +00:00
Vincent Petry f80f7a33e8
Fix baseline further
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-17 10:31:09 +01:00
Roeland Jago Douma 7bb7f4d936
Update psalm baseline
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-17 10:06:06 +01:00
Morris Jobke 9749514649 Use correct exception type hint in catch statement
Found by psalm update 4.6.2 to 4.6.3 in #26111

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-03-17 08:47:07 +00:00
Nextcloud bot fdabe1172b
[tx-robot] updated from transifex 2021-03-17 02:24:39 +00:00
Robin Appelman 279f0d72f3 dont allow creating users with __groupfolders as uid
Fixes https://github.com/nextcloud/groupfolders/issues/338

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-16 18:51:58 +00:00