Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 439 → Rev 440

/trunk/includes/uuid_utils.inc.php
364,7 → 364,7
}
 
# On Debian: aptitude install uuid-runtime
if (!stristr(PHP_OS, 'WINDOWS')) {
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
$out = array();
$ec = -1;
exec('uuidgen -t', $out, $ec);
434,12 → 434,13
// here, and mac_utils.inc.php shall only be optional. What to do?
$out = array();
$ec = -1;
if (stristr(PHP_OS, 'WINDOWS')) {
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
exec("ipconfig /all", $out, $ec);
if ($ec == 0) {
$out = implode("\n",$out);
$m = array();
if (preg_match("/([0-9a-f]{2}\\-[0-9a-f]{2}\\-[0-9a-f]{2}\\-[0-9a-f]{2}\\-[0-9a-f]{2}\\-[0-9a-f]{2})/ismU", $out, $m)) {
return $m[1];
return str_replace('-', ':', strtolower($m[1]));
}
}
} else {
446,6 → 447,7
exec("netstat -ie", $out, $ec);
if ($ec == 0) {
$out = implode("\n",$out);
$m = array();
if (preg_match("/([0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2})/ismU", $out, $m)) {
return $m[1];
}
506,7 → 508,7
return trim(uuid_create(UUID_TYPE_RANDOM));
}
 
if (!stristr(PHP_OS, 'WINDOWS')) {
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
# On Debian: aptitude install uuid-runtime
$out = array();
$ec = -1;