Browse Source

Added 'islandora_os_check' function, primarily for Windows detection.

pull/441/head
Stefan Langer 11 years ago
parent
commit
6d1ef00972
  1. 16
      islandora.module

16
islandora.module

@ -1801,3 +1801,19 @@ function islandora_islandora_metadata_display_info() {
),
);
}
/**
* Determines the server's operating system.
*
* @return string
*
*/
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')) {
return 'Windows';
}
return 'Linux';
}

Loading…
Cancel
Save