Explorar el Código

only enable compatible apps

tags/v4.5.0beta1
Frank Karlitschek hace 12 años
padre
commit
dfd5a9759c
Se han modificado 1 ficheros con 10 adiciones y 2 borrados
  1. 10
    2
      lib/app.php

+ 10
- 2
lib/app.php Ver fichero

@@ -189,8 +189,16 @@ class OC_App{
}
}
if($app!==false){
OC_Appconfig::setValue( $app, 'enabled', 'yes' );
return true;
// check if the app is compatible with this version of ownCloud
$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{
return false;
}

Cargando…
Cancelar
Guardar