Merge pull request #1886 from nextcloud/downstream-26385
Remove checks about running on Windows
This commit is contained in:
commit
72b5206c44
|
@ -254,16 +254,9 @@ class OC_Helper {
|
||||||
if ($path === false) {
|
if ($path === false) {
|
||||||
$path = getenv("PATH");
|
$path = getenv("PATH");
|
||||||
}
|
}
|
||||||
// check method depends on operating system
|
// we look for an executable file of that name
|
||||||
if (!strncmp(PHP_OS, "WIN", 3)) {
|
$exts = [""];
|
||||||
// on Windows an appropriate COM or EXE file needs to exist
|
$check_fn = "is_executable";
|
||||||
$exts = array(".exe", ".com");
|
|
||||||
$check_fn = "file_exists";
|
|
||||||
} else {
|
|
||||||
// anywhere else we look for an executable file of that name
|
|
||||||
$exts = array("");
|
|
||||||
$check_fn = "is_executable";
|
|
||||||
}
|
|
||||||
// Default check will be done with $path directories :
|
// Default check will be done with $path directories :
|
||||||
$dirs = explode(PATH_SEPARATOR, $path);
|
$dirs = explode(PATH_SEPARATOR, $path);
|
||||||
// WARNING : We have to check if open_basedir is enabled :
|
// WARNING : We have to check if open_basedir is enabled :
|
||||||
|
@ -498,7 +491,6 @@ class OC_Helper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to find a program
|
* Try to find a program
|
||||||
* Note: currently windows is not supported
|
|
||||||
*
|
*
|
||||||
* @param string $program
|
* @param string $program
|
||||||
* @return null|string
|
* @return null|string
|
||||||
|
|
|
@ -667,15 +667,6 @@ class OC_Util {
|
||||||
$webServerRestart = true;
|
$webServerRestart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if server running on Windows platform
|
|
||||||
if(OC_Util::runningOnWindows()) {
|
|
||||||
$errors[] = [
|
|
||||||
'error' => $l->t('Microsoft Windows Platform is not supported'),
|
|
||||||
'hint' => $l->t('Running Nextcloud Server on the Microsoft Windows platform is not supported. We suggest you ' .
|
|
||||||
'use a Linux server in a virtual machine if you have no option for migrating the server itself.')
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if config folder is writable.
|
// Check if config folder is writable.
|
||||||
if(!OC_Helper::isReadOnlyConfigEnabled()) {
|
if(!OC_Helper::isReadOnlyConfigEnabled()) {
|
||||||
if (!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
|
if (!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
|
||||||
|
@ -1267,15 +1258,6 @@ class OC_Util {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the server is running on Windows
|
|
||||||
*
|
|
||||||
* @return bool true if running on Windows, false otherwise
|
|
||||||
*/
|
|
||||||
public static function runningOnWindows() {
|
|
||||||
return (substr(PHP_OS, 0, 3) === "WIN");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the server is running on Mac OS X
|
* Checks whether the server is running on Mac OS X
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue