summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/installer.php11
-rw-r--r--lib/util.php4
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/installer.php b/lib/installer.php
index 731eaaa9030..bdbff3673bd 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -130,10 +130,19 @@ class OC_Installer{
// check the code for not allowed calls
if(!OC_Installer::checkCode($info['id'],$extractDir)){
+ OC_Log::write('core','App can\'t be installed because of not allowed code in the App',OC_Log::ERROR);
OC_Helper::rmdirr($extractDir);
return false;
}
-
+
+ // check if the app is compatible with this version of ownCloud
+ $version=OC_Util::getVersion();
+ if(!isset($info['require']) or ($version[0]>$info['require'])){
+ OC_Log::write('core','App can\'t be installed because it is not compatible with this version of ownCloud',OC_Log::ERROR);
+ OC_Helper::rmdirr($extractDir);
+ return false;
+ }
+
//check if an app with the same id is already installed
if(self::isInstalled( $info['id'] )){
OC_Log::write('core','App already installed',OC_Log::WARN);
diff --git a/lib/util.php b/lib/util.php
index 22b327a88c0..0e5f3a7362c 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -74,7 +74,7 @@ class OC_Util {
* @return array
*/
public static function getVersion(){
- return array(3,91,0);
+ return array(4,00,0);
}
/**
@@ -82,7 +82,7 @@ class OC_Util {
* @return string
*/
public static function getVersionString(){
- return '4 RC';
+ return '4 RC2';
}
/**