-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.0] Constant usage #18504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Constant usage #18504
Changes from 3 commits
dafcf61
b7b6cb6
97ba44e
6005b8e
5281cfb
a09ab4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ | |
| { | ||
| if (function_exists('php_uname')) | ||
| { | ||
| define('_AKEEBA_IS_WINDOWS', stristr(php_uname(), 'windows')); | ||
| define('_AKEEBA_IS_WINDOWS', stristr(PHP_OS, 'windows')); | ||
|
||
| } | ||
| else | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,12 +45,12 @@ public static function &getList(&$params) | |
| { | ||
| $rows[$i] = new \stdClass; | ||
| $rows[$i]->title = \JText::_('MOD_STATS_OS'); | ||
| $rows[$i]->data = substr(php_uname(), 0, 7); | ||
| $rows[$i]->data = substr(PHP_OS, 0, 7); | ||
|
||
| $i++; | ||
|
|
||
| $rows[$i] = new \stdClass; | ||
| $rows[$i]->title = \JText::_('MOD_STATS_PHP'); | ||
| $rows[$i]->data = phpversion(); | ||
| $rows[$i]->data = PHP_VERSION; | ||
| $i++; | ||
|
|
||
| $rows[$i] = new \stdClass; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't the same thing according to http://php.net/manual/en/function.php-uname.php - there's a difference of
PHP_OSbeing what PHP was built with rather than what it's running onThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I know.
However, there should only be two cases here, if I am not mistaken.
To summarize: The 's' parameter only would return the name of the system: 'Linux', 'Windows', 'MacOs', etc. So would the proposed change.
If you have a prebuilt package for Linux, it will have been built on Linux. Same goes for the other architectures.
Unless I am missing or misunderstanding something?