Browse Source

ISLANDORA-450 Instead of PHP_OS, now using php_uname() for OS detection.

pull/450/head
Stefan Langer 11 years ago
parent
commit
bc98a7e373
  1. 8
      islandora.module

8
islandora.module

@ -1873,11 +1873,9 @@ function islandora_islandora_datastream_access($op, AbstractDatastream $datastre
* The name of the operating system being used. * The name of the operating system being used.
*/ */
function islandora_os_check() { function islandora_os_check() {
// Determine if PHP is currently running on Windows. (The constant // Determine if PHP is currently running on Windows.
// "PHP_OS" may return "Windows," "WIN32," "WINNT," "CYGWIN_NT-5.1," etc.) if (strpos(strtolower(php_uname('s')), 'windows') !== FALSE) {
if ((strtolower(substr(PHP_OS, 0, 3)) == 'win') ||
(strtolower(substr(PHP_OS, 0, 6)) == 'cygwin')) {
return 'Windows'; return 'Windows';
} }
return 'Unix'; return 'Linux';
} }

Loading…
Cancel
Save