summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2013-03-29 15:59:54 +0100
committerSam Tuke <samtuke@owncloud.com>2013-03-29 15:59:54 +0100
commit3cbfacb439396b411f1cd89f1eb232704e6b5d55 (patch)
treedcbcda086a0c019acdf8da43e306725112d4a3b0 /lib
parentff6f52d5ec24a9c940f3e8b0dd2f731b1a42104e (diff)
parent86ac30c596868b581d0d1f103807ab48cac0041a (diff)
downloadnextcloud-server-3cbfacb439396b411f1cd89f1eb232704e6b5d55.tar.gz
nextcloud-server-3cbfacb439396b411f1cd89f1eb232704e6b5d55.zip
Merge branch 'master' into files_encryption
Diffstat (limited to 'lib')
-rw-r--r--lib/installer.php6
-rwxr-xr-xlib/util.php25
2 files changed, 17 insertions, 14 deletions
diff --git a/lib/installer.php b/lib/installer.php
index 251d115b76c..49ba4492632 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -134,8 +134,10 @@ class OC_Installer{
}
// check if the app is compatible with this version of ownCloud
- $version=OC_Util::getVersion();
- if(!isset($info['require']) or ($version[0]>$info['require'])) {
+ if(
+ !isset($info['require'])
+ or !OC_App::isAppVersionCompatible(OC_Util::getVersion(), $info['require'])
+ ) {
OC_Log::write('core',
'App can\'t be installed because it is not compatible with this version of ownCloud',
OC_Log::ERROR);
diff --git a/lib/util.php b/lib/util.php
index 7e8fc9b6bb7..1fa3ad765d0 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -411,18 +411,19 @@ 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;
- }
+ /**
+ * get an id unique for this instance
+ * @return string
+ */
+ public static function getInstanceId() {
+ $id = OC_Config::getValue('instanceid', null);
+ if(is_null($id)) {
+ // We need to guarantee at least one letter in instanceid so it can be used as the session_name
+ $id = 'oc' . uniqid();
+ OC_Config::setValue('instanceid', $id);
+ }
+ return $id;
+ }
/**
* @brief Static lifespan (in seconds) when a request token expires.