Added warning for Mac OS on setup page
This commit is contained in:
parent
36c0f08ec0
commit
6de9033d86
2 changed files with 31 additions and 1 deletions
|
@ -80,6 +80,13 @@ class Controller {
|
||||||
return $post;
|
return $post;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gathers system information like database type and does
|
||||||
|
* a few system checks.
|
||||||
|
*
|
||||||
|
* @return array of system info, including an "errors" value
|
||||||
|
* in case of errors/warnings
|
||||||
|
*/
|
||||||
public function getSystemInfo() {
|
public function getSystemInfo() {
|
||||||
$hasSQLite = class_exists('SQLite3');
|
$hasSQLite = class_exists('SQLite3');
|
||||||
$hasMySQL = is_callable('mysql_connect');
|
$hasMySQL = is_callable('mysql_connect');
|
||||||
|
@ -122,6 +129,20 @@ class Controller {
|
||||||
$htaccessWorking = false;
|
$htaccessWorking = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (\OC_Util::runningOnMac()) {
|
||||||
|
$l10n = \OC_L10N::get('core');
|
||||||
|
$themeName = \OC_Util::getTheme();
|
||||||
|
$theme = new \OC_Defaults();
|
||||||
|
$errors[] = array(
|
||||||
|
'error' => $l10n->t(
|
||||||
|
'Mac OS X is not supported and %s will not work properly on this platform. ' .
|
||||||
|
'Use it at your own risk! ',
|
||||||
|
$theme->getName()
|
||||||
|
),
|
||||||
|
'hint' => $l10n->t('For the best results, please consider using a GNU/Linux server instead.')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'hasSQLite' => $hasSQLite,
|
'hasSQLite' => $hasSQLite,
|
||||||
'hasMySQL' => $hasMySQL,
|
'hasMySQL' => $hasMySQL,
|
||||||
|
|
|
@ -1085,12 +1085,21 @@ class OC_Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool - well are we running on windows or not
|
* Checks whether the server is running on Windows
|
||||||
|
* @return bool true if running on Windows, false otherwise
|
||||||
*/
|
*/
|
||||||
public static function runningOnWindows() {
|
public static function runningOnWindows() {
|
||||||
return (substr(PHP_OS, 0, 3) === "WIN");
|
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
|
||||||
|
*/
|
||||||
|
public static function runningOnMac() {
|
||||||
|
return (strtoupper(substr(PHP_OS, 0, 6)) === 'DARWIN');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the case that there may not be a theme, then check if a "default"
|
* Handles the case that there may not be a theme, then check if a "default"
|
||||||
* theme exists and take that one
|
* theme exists and take that one
|
||||||
|
|
Loading…
Reference in a new issue