From bc98a7e373a0ffd2c90dc11860fffafb08d18234 Mon Sep 17 00:00:00 2001 From: Stefan Langer Date: Mon, 27 Jan 2014 18:43:59 -0500 Subject: [PATCH] ISLANDORA-450 Instead of PHP_OS, now using php_uname() for OS detection. --- islandora.module | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/islandora.module b/islandora.module index ef1bf8cc..15ef0a88 100644 --- a/islandora.module +++ b/islandora.module @@ -1873,11 +1873,9 @@ function islandora_islandora_datastream_access($op, AbstractDatastream $datastre * The name of the operating system being used. */ function islandora_os_check() { - // Determine if PHP is currently running on Windows. (The constant - // "PHP_OS" may return "Windows," "WIN32," "WINNT," "CYGWIN_NT-5.1," etc.) - if ((strtolower(substr(PHP_OS, 0, 3)) == 'win') || - (strtolower(substr(PHP_OS, 0, 6)) == 'cygwin')) { + // Determine if PHP is currently running on Windows. + if (strpos(strtolower(php_uname('s')), 'windows') !== FALSE) { return 'Windows'; } - return 'Unix'; + return 'Linux'; }