only enable compatible apps
This commit is contained in:
parent
9c2a6fb551
commit
dfd5a9759c
12
lib/app.php
12
lib/app.php
|
@ -189,8 +189,16 @@ class OC_App{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($app!==false){
|
if($app!==false){
|
||||||
OC_Appconfig::setValue( $app, 'enabled', 'yes' );
|
// check if the app is compatible with this version of ownCloud
|
||||||
return true;
|
$info=OC_App::getAppInfo($app);
|
||||||
|
$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);
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
OC_Appconfig::setValue( $app, 'enabled', 'yes' );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue