diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-09-30 16:03:18 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-09-30 16:03:18 +0200 |
commit | 509128be585b7108ef77f807d49ce5ffe1a57853 (patch) | |
tree | 97439b75d0f8a1f1d045f75277c0b2f35456c23c /storage-backend/lib/functions.common.inc.php | |
parent | 7ce02c25b1a1e0ed915be4a9bc781744328d92ee (diff) |
Implements FS#236: Save receipient jid
Diffstat (limited to 'storage-backend/lib/functions.common.inc.php')
-rw-r--r-- | storage-backend/lib/functions.common.inc.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/storage-backend/lib/functions.common.inc.php b/storage-backend/lib/functions.common.inc.php new file mode 100644 index 0000000..b47268e --- /dev/null +++ b/storage-backend/lib/functions.common.inc.php @@ -0,0 +1,18 @@ +<?php +/* + * This file contains functions commonly used. + */ + +/** + * Copied from http://rogerstringer.com/2013/11/15/generate-uuids-php/ + */ +function generate_uuid() { + return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', + mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), + mt_rand( 0, 0xffff ), + mt_rand( 0, 0x0fff ) | 0x4000, + mt_rand( 0, 0x3fff ) | 0x8000, + mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) + ); +} +?>
\ No newline at end of file |