-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Give install warning on all OS other than Linux #28761
Conversation
Note: this is on top of #28759 so that it gets function runningOnLinux() |
Agreed 👍 |
Backport Please |
Q: why not a generic |
'Use it at your own risk! ', | ||
$this->defaults->getName() | ||
array($os, $this->defaults->getName()) |
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.
[ ] please not array()
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 took the example from https://doc.owncloud.org/server/10.0/developer_manual/core/translation.html
$l->t('%s is available. Get <a href="%s">more information</a>', array($data['versionstring'], $data['web']));
I guess that example is not the current way it is liked to be done.
* | ||
* @return bool true if running on Linux, false otherwise | ||
*/ | ||
public static function runningOnLinux() { |
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.
generally speaking we should not put more code into legacy classes .... but I have no better location where to but this ...
c03b7dd
to
3ec59bb
Compare
@mmattel yes, I could make
and have it take "linux", "mac" or "bsd" and return the boolean answer if on that type of OS. Does it make much difference to having the 3 functions? |
@phil-davis |
Note: the "runningOn" functions are actually added in #28759 - which this sits on top of. (When I started looking at a BSD detection thing for filemtime then I also noticed the setup page thing, so had 2 reasons for similar underlying code) So I will refactor there... |
After refactoring, the code all "just fitted" in #28759 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Make the install warning for Mac OS X more generic, so the warning is given for any OS that is not Linux.
Related Issue
#28760
Motivation and Context
People can install on officially-unsupported *BSD at the moment, without being given a warning.
How Has This Been Tested?
Remove the "!" in front of \OC_Util::runningOnLinux() and set installed to false in a dev system.
(to trick it into thinking it is an unsupported system)
Go to the web UI. Confirm that the setup page gives a warning with reasonable text.
Types of changes
Checklist:
This was noticed when looking at code that used runningOnMac(), PHP_OS and/or php_uname to do stuff based on the operating system.