summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRealRancor <fisch.666@gmx.de>2016-10-15 13:22:25 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-10-24 16:12:17 +0200
commit14b1d946a8fcd044ab65f784fe40ebf7f3954855 (patch)
tree70fcae2c3e9f122d0a9f533701beb2f1a3f5814e
parent729c06548fbfe035c14dae68c4b09494b292d217 (diff)
downloadnextcloud-server-14b1d946a8fcd044ab65f784fe40ebf7f3954855.tar.gz
nextcloud-server-14b1d946a8fcd044ab65f784fe40ebf7f3954855.zip
Remove checks whether OC is running on Windows pt. 2
-rw-r--r--console.php2
-rw-r--r--lib/private/legacy/helper.php14
-rw-r--r--lib/private/legacy/util.php18
3 files changed, 4 insertions, 30 deletions
diff --git a/console.php b/console.php
index c9a9a49c4e9..939cd43d617 100644
--- a/console.php
+++ b/console.php
@@ -67,7 +67,7 @@ try {
echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL;
echo "Current user: " . $user['name'] . PHP_EOL;
echo "Owner of config.php: " . $configUser['name'] . PHP_EOL;
- echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL;
+ echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL;
exit(1);
}
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php
index 65b4c0d8afe..9c4bc895fb9 100644
--- a/lib/private/legacy/helper.php
+++ b/lib/private/legacy/helper.php
@@ -254,16 +254,9 @@ class OC_Helper {
if ($path === false) {
$path = getenv("PATH");
}
- // check method depends on operating system
- if (!strncmp(PHP_OS, "WIN", 3)) {
- // on Windows an appropriate COM or EXE file needs to exist
- $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";
- }
+ // we look for an executable file of that name
+ $exts = [""];
+ $check_fn = "is_executable";
// Default check will be done with $path directories :
$dirs = explode(PATH_SEPARATOR, $path);
// WARNING : We have to check if open_basedir is enabled :
@@ -498,7 +491,6 @@ class OC_Helper {
/**
* Try to find a program
- * Note: currently windows is not supported
*
* @param string $program
* @return null|string
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index b6c3b375396..42fd0ba7db3 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -667,15 +667,6 @@ class OC_Util {
$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.
if(!OC_Helper::isReadOnlyConfigEnabled()) {
if (!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
@@ -1268,15 +1259,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
*
* @return bool true if running on Mac OS X, false otherwise