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 |
| '%s is not supported and %s will not work properly on this platform. ' . | ||
| 'Use it at your own risk! ', | ||
| $this->defaults->getName() | ||
| array($os, $this->defaults->getName()) |
There was a problem hiding this comment.
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.
| * Checks whether the server is running on Linux | ||
| * | ||
| * @return bool true if running on Linux, false otherwise | ||
| */ |
There was a problem hiding this comment.
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.