From c0b8e63a3fe600326e0f18c03207ba9fd30c8126 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 18 Jul 2011 18:13:46 -0700 Subject: basic diaspora discovery --- boot.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 0bf92c99e..abb043036 100644 --- a/boot.php +++ b/boot.php @@ -2,7 +2,7 @@ define ( 'FRIENDIKA_VERSION', '2.2.1045' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); -define ( 'DB_UPDATE_VERSION', 1075 ); +define ( 'DB_UPDATE_VERSION', 1076 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -2957,3 +2957,15 @@ function return_bytes ($size_str) { } }} +function generate_guid() { + $found = true; + do { + $guid = substr(random_string(),0,16); + $x = q("SELECT `uid` FROM `user` WHERE `guid` = '%s' LIMIT 1", + dbesc($guid) + ); + if(! count($x)) + $found = false; + } while ($found == true ); + return $guid; +} \ No newline at end of file -- cgit v1.2.3