/trunk/includes/classes/OIDplus.class.php |
---|
1368,8 → 1368,8 |
$i = 0; |
do { |
if (is_dir($dir.'/git')) { |
$confs = glob($dir.'/git/'.'*'.'/config'); |
foreach ($confs as $conf) { |
$confs = @glob($dir.'/git/'.'*'.'/config'); |
if ($confs) foreach ($confs as $conf) { |
$cont = file_get_contents($conf); |
if (isset(OIDplus::getEditionInfo()['gitrepo']) && (OIDplus::getEditionInfo()['gitrepo'] != '') && (strpos($cont, OIDplus::getEditionInfo()['gitrepo']) !== false)) { |
return dirname($conf); |
1377,7 → 1377,7 |
} |
} |
$i++; |
} while (($i<100) && ($dir != ($new_dir = realpath($dir.'/../'))) && ($dir = $new_dir)); |
} while (($i<100) && ($dir != ($new_dir = @realpath($dir.'/../'))) && ($dir = $new_dir)); |
return false; |
} |
/trunk/includes/functions.inc.php |
---|
276,8 → 276,8 |
} |
function rec_is_dir($dir) { |
$dirs = glob($dir); |
foreach ($dirs as $dir) { |
$dirs = @glob($dir); |
if ($dirs) foreach ($dirs as $dir) { |
if (is_dir($dir)) return true; |
} |
return false; |
/trunk/plugins/viathinksoft/publicPages/000_objects/OIDplusPagePublicObjects.class.php |
---|
796,7 → 796,8 |
'oid:1.3.6.1.4.1.37476.9000', |
'oid:1.3.6.1.4.1.37553.8.8', |
'oid:2.16.276.1', |
//TODO?'oid:2.25' |
//'oid:2.25', // according to Olivier, it is OK that UUID owners define their own ASN.1 ID, since the ASN.1 ID is not required to be unique |
//'oid:1.2.840.113556.1.8000.2554' // Adhoc (GUID/UUID-based) customer use. It is probably the same case as the UUID OIDs, after all, these are UUIDs, too. |
); |
// http://www.oid-info.com/cgi-bin/display?a=list-by-category&category=Not%20allocating%20Unicode%20labels |
/trunk/plugins/viathinksoft/publicPages/095_attachments/OIDplusPagePublicAttachments.class.php |
---|
201,8 → 201,8 |
} |
} else { |
// If it was the last file, delete the empty directory |
$ary = glob($uploaddir . DIRECTORY_SEPARATOR . '*'); |
if (count($ary) == 0) @rmdir($uploaddir); |
$ary = @glob($uploaddir . DIRECTORY_SEPARATOR . '*'); |
if (is_array($ary) && (count($ary) == 0)) @rmdir($uploaddir); |
} |
OIDplus::logger()->log("[OK]OID($id)+[?INFO/!OK]OIDRA($id)?/[?INFO/!OK]A?", "Deleted attachment '".basename($uploadfile)."' from object '$id'"); |
336,7 → 336,7 |
try { |
$upload_dir = self::getUploadDir($id); |
$files = glob($upload_dir . DIRECTORY_SEPARATOR . '*'); |
$files = @glob($upload_dir . DIRECTORY_SEPARATOR . '*'); |
$found_files = false; |
$obj = OIDplusObject::parse($id); |
358,7 → 358,7 |
$output .= '<th>'._L('Download').'</th>'; |
if ($can_delete) $output .= '<th>'._L('Delete').'</th>'; |
$output .= '</tr>'; |
foreach ($files as $file) { |
if ($files) foreach ($files as $file) { |
if (is_dir($file)) continue; |
$output .= '<tr>'; |
414,8 → 414,8 |
// Delete the attachment folder including all files in it (note: Subfolders are not possible) |
$uploaddir = self::getUploadDir($id); |
if ($uploaddir != '') { |
$ary = glob($uploaddir . DIRECTORY_SEPARATOR . '*'); |
foreach ($ary as $a) @unlink($a); |
$ary = @glob($uploaddir . DIRECTORY_SEPARATOR . '*'); |
if ($ary) foreach ($ary as $a) @unlink($a); |
@rmdir($uploaddir); |
if (is_dir($uploaddir)) { |
OIDplus::logger()->log("[WARN]OID($id)+[WARN]A!", "Attachment directory '$uploaddir' could not be deleted during the deletion of the OID"); |
436,8 → 436,8 |
public function whoisObjectAttributes($id, &$out) { |
// Interface 1.3.6.1.4.1.37476.2.5.2.3.4 |
$files = glob(self::getUploadDir($id) . DIRECTORY_SEPARATOR . '*'); |
foreach ($files as $file) { |
$files = @glob(self::getUploadDir($id) . DIRECTORY_SEPARATOR . '*'); |
if ($files) foreach ($files as $file) { |
$out[] = 'attachment-name: '.basename($file); |
$out[] = 'attachment-url: '.OIDplus::webpath(__DIR__).'download.php?id='.urlencode($id).'&filename='.urlencode(basename($file)); |
} |
/trunk/plugins/viathinksoft/publicPages/500_resources/OIDplusPagePublicResources.class.php |
---|
112,8 → 112,8 |
$out = array(); |
$root = OIDplus::localpath().'userdata/resources/'; |
$res = $onlydir ? glob($root.ltrim($reldir,'/'), GLOB_ONLYDIR) : glob($root.ltrim($reldir,'/')); |
foreach ($res as &$x) { |
$res = $onlydir ? @glob($root.ltrim($reldir,'/'), GLOB_ONLYDIR) : @glob($root.ltrim($reldir,'/')); |
if ($res) foreach ($res as &$x) { |
$x = substr($x, strlen($root)); |
if (strpos($x,'$') !== false) continue; |
$out[] = $x; |
120,8 → 120,8 |
} |
$root = OIDplus::localpath().'res/'; |
$res = $onlydir ? glob($root.ltrim($reldir,'/'), GLOB_ONLYDIR) : glob($root.ltrim($reldir,'/')); |
foreach ($res as $x) { |
$res = $onlydir ? @glob($root.ltrim($reldir,'/'), GLOB_ONLYDIR) : @glob($root.ltrim($reldir,'/')); |
if ($res) foreach ($res as $x) { |
$x = substr($x, strlen($root)); |
if (strpos($x,'$') !== false) continue; |
$out[] = $x; |
/trunk/vendor/danielmarschall/php_utils/git_utils.inc.php |
---|
3,7 → 3,7 |
/* |
* PHP git functions |
* Copyright 2021 Daniel Marschall, ViaThinkSoft |
* Revision 2021-12-13 |
* Revision 2021-12-29 |
* |
* Licensed under the Apache License, Version 2.0 (the "License"); |
* you may not use this file except in compliance with the License. |
69,9 → 69,9 |
return $uncompressed; |
} else { |
$pack_files = glob($objects_dir.'/pack/pack-*.pack'); |
$pack_files = @glob($objects_dir.'/pack/pack-*.pack'); |
$last_exception = 'No pack files found'; |
foreach ($pack_files as $basename) { |
if ($pack_files) foreach ($pack_files as $basename) { |
$basename = substr(basename($basename),0,strlen(basename($basename))-5); |
try { |
return git_read_object($commit_object, |
/trunk/vendor/danielmarschall/php_utils/x_509_utils.inc.php |
---|
3,7 → 3,7 |
/* |
* X.509 Utilities for PHP |
* Copyright 2011-2021 Daniel Marschall, ViaThinkSoft |
* Version 2021-06-10 |
* Version 2021-06-29 |
* |
* Licensed under the Apache License, Version 2.0 (the "License"); |
* you may not use this file except in compliance with the License. |
61,8 → 61,8 |
$ary = array(); |
$aryr = array(); |
$all_trusted = glob($CApath . '*.pem'); |
foreach ($all_trusted as &$a) { |
$all_trusted = @glob($CApath . '*.pem'); |
if ($all_trusted) foreach ($all_trusted as &$a) { |
if (x_509_is_crl_file($a)) { |
$out = array(); |
exec(OPENSSL_EXEC.' crl -hash -noout -in '.escapeshellarg($a), $out, $code); |
/trunk/vendor/danielmarschall/uuid_mac_utils/includes/uuid_utils.inc.php |
---|
3,7 → 3,7 |
/* |
* UUID utils for PHP |
* Copyright 2011 - 2021 Daniel Marschall, ViaThinkSoft |
* Version 2021-05-21 |
* Version 2021-05-29 |
* |
* Licensed under the Apache License, Version 2.0 (the "License"); |
* you may not use this file except in compliance with the License. |
293,7 → 293,7 |
function oid_to_uuid($oid) { |
if (!is_uuid_oid($oid)) return false; |
if ($oid[0] == '.') { |
if (substr($oid,0,1) == '.') { |
$oid = substr($oid, 1); |
} |
$ary = explode('.', $oid); |
313,7 → 313,7 |
} |
function is_uuid_oid($oid, $only_allow_root=false) { |
if ($oid[0] == '.') $oid = substr($oid, 1); // remove leading dot |
if (substr($oid,0,1) == '.') $oid = substr($oid, 1); // remove leading dot |
$ary = explode('.', $oid); |
485,7 → 485,8 |
} |
} else { |
// Linux |
foreach (glob('/sys/class/net/'.'*'.'/address') as $x) { |
$addresses = @glob('/sys/class/net/'.'*'.'/address'); |
if ($addresses) foreach ($addresses as $x) { |
if (!strstr($x,'/lo/')) { |
$detected_mac = trim(file_get_contents($x)); |
return $detected_mac; |