mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
Functions: Created is_uuid() function for validation.
This commit is contained in:
@@ -106,6 +106,14 @@
|
||||
//echo uuid();
|
||||
}
|
||||
|
||||
if (!function_exists('is_uuid')) {
|
||||
function is_uuid($uuid) {
|
||||
//uuid version 4
|
||||
$regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i';
|
||||
return preg_match($regex, $uuid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('recursive_copy')) {
|
||||
function recursive_copy($src,$dst) {
|
||||
$dir = opendir($src);
|
||||
|
||||
Reference in New Issue
Block a user