Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
6de9033d
Commit
6de9033d
authored
11 years ago
by
Vincent Petry
Browse files
Options
Downloads
Patches
Plain Diff
Added warning for Mac OS on setup page
parent
36c0f08e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/setup/controller.php
+21
-0
21 additions, 0 deletions
core/setup/controller.php
lib/private/util.php
+10
-1
10 additions, 1 deletion
lib/private/util.php
with
31 additions
and
1 deletion
core/setup/controller.php
+
21
−
0
View file @
6de9033d
...
...
@@ -80,6 +80,13 @@ class Controller {
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
()
{
$hasSQLite
=
class_exists
(
'SQLite3'
);
$hasMySQL
=
is_callable
(
'mysql_connect'
);
...
...
@@ -122,6 +129,20 @@ class Controller {
$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
(
'hasSQLite'
=>
$hasSQLite
,
'hasMySQL'
=>
$hasMySQL
,
...
...
This diff is collapsed.
Click to expand it.
lib/private/util.php
+
10
−
1
View file @
6de9033d
...
...
@@ -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
()
{
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"
* theme exists and take that one
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment