diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-06-05 19:32:48 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-06-05 19:32:48 +0200 |
commit | dcf1eed8164c8ab7490c82157d70d95f51aaddd4 (patch) | |
tree | 6b126785921ead5a180d907926410f9445adcf29 /lib/util.php | |
parent | eed0450351451fa409b8d2c81b8dde9e8702036a (diff) | |
download | nextcloud-server-dcf1eed8164c8ab7490c82157d70d95f51aaddd4.tar.gz nextcloud-server-dcf1eed8164c8ab7490c82157d70d95f51aaddd4.zip |
add unique instance id
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php index 7a9545e3659..20888fa71f4 100644 --- a/lib/util.php +++ b/lib/util.php @@ -330,4 +330,17 @@ class OC_Util { } exit(); } + + /** + * get an id unqiue for this instance + * @return string + */ + public static function getInstanceId(){ + $id=OC_Config::getValue('instanceid',null); + if(is_null($id)){ + $id=uniqid(); + OC_Config::setValue('instanceid',$id); + } + return $id; + } } |