aboutsummaryrefslogtreecommitdiffstats
path: root/lib/util.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-05 19:32:48 +0200
committerRobin Appelman <icewind@owncloud.com>2012-06-05 19:32:48 +0200
commitdcf1eed8164c8ab7490c82157d70d95f51aaddd4 (patch)
tree6b126785921ead5a180d907926410f9445adcf29 /lib/util.php
parenteed0450351451fa409b8d2c81b8dde9e8702036a (diff)
downloadnextcloud-server-dcf1eed8164c8ab7490c82157d70d95f51aaddd4.tar.gz
nextcloud-server-dcf1eed8164c8ab7490c82157d70d95f51aaddd4.zip
add unique instance id
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php13
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;
+ }
}