-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add maximum.supported.desktop.version
#41183
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Florian Grabmeier <flo.grabmeier@gmail.com>
Signed-off-by: Florian Grabmeier <flo.grabmeier@gmail.com>
Co-authored-by: Simon L. <szaimen@e.mail.de> Signed-off-by: flox_x <93255373+flooxo@users.noreply.github.com> Signed-off-by: Florian Grabmeier <flo.grabmeier@gmail.com>
ba23f6b
to
ed0bcc9
Compare
Signed-off-by: flox_x <93255373+flooxo@users.noreply.github.com>
I hope now it's as intended :) |
version_compare($versionMatches[1], $minimumSupportedDesktopVersion) === -1 || | ||
!empty($maximumSupportedDesktopVersion) && | ||
version_compare($versionMatches[1], $maximumSupportedDesktopVersion) === 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mixing &&
and ||
is confusing, can you add parenthesis to isolate the checks?
Or regroup the checks into dedicated variables :)
You can also probably use a crazy versio number as maximum fallback, like
- $maximumSupportedDesktopVersion = $this->config->getSystemValueString('maximum.supported.desktop.version', '');
+ $maximumSupportedDesktopVersion = $this->config->getSystemValueString('maximum.supported.desktop.version', '99.99.99');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be better with two different error messages if the client is too old or too new.
It will help for debugging and solve the missing parenthesis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seconded! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same. Good otherwise.
'maximum.supported.desktop.version'
parameter #30143Summary
Add new config parameter
maximum.supported.desktop.version
(similar tominimum.supported.desktop.version
) in order to prevent sync issues after updates (like nextcloud/desktop#4016 or nextcloud/desktop#5564)Checklist