The diff can be checked using: git diff --ignore-all-space --ignore-blank-lines
To see only the changes not related to blank lines.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Eight test classes overrode tearDown() for custom DB cleanup but never
called parent::tearDown(). TestCase::tearDown() does three things these
tests were silently skipping after every test method:
- ILockingProvider::releaseAll() — unreleased locks bleed into subsequent
tests and can cause deadlocks or unexpected NotFoundException
- Storage::getGlobalCache()->clearCache() — stale filecache entries from
share/storage tests cause unrelated ObjectStore tests to receive false
from fopen() (fseek() then fails with "Argument must be of type resource")
- UserMountCache::flush() — stale mount cache causes share lookups in
later tests to fail with ShareNotFound
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
When an ownCloud-migrated group share (which has no per-user USERGROUP
subshare) is renamed for the first time, DefaultShareProvider::move()
inserted a new USERGROUP row without setting `accepted`. The column
defaulted to 0 (STATUS_PENDING), causing MountProvider to skip the
share on the next login — the shared file disappeared for the recipient.
Fix: set accepted = STATUS_ACCEPTED explicitly on the INSERT in
DefaultShareProvider::move() for the TYPE_GROUP branch.
Secondary fix: SharedMount::moveMount() silently returned true when
updateFileTarget() threw (e.g. group no longer exists on an OC-migrated
instance). Set $result = false in the catch block so View::rename()
propagates the failure instead of silently corrupting VFS state.
An opt-in occ command (sharing:fix-owncloud-group-shares) with --dry-run
support is included to repair existing broken instances. It targets only
TYPE_USERGROUP subshares with accepted=STATUS_PENDING and permissions!=0
(shares that were accepted but broken by the missing column default),
leaving explicitly declined shares (permissions=0) untouched.
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
* Resolves: https://github.com/nextcloud/server/issues/48629
While the database supports NULL, the typing has always said it only returns *string*.
So to not break any apps that might trust the typings we should return `''` if the database is set to `NULL`.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>