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;
throw new \Exception($l->t("App can't be installed because of not allowed code in the App"));
}
// check if the app is compatible with this version of ownCloud
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);
!isset($info['require'])
or !OC_App::isAppVersionCompatible(OC_Util::getVersion(), $info['require'])
) {
OC_Helper::rmdirr($extractDir);
return false;
throw new \Exception($l->t("App can't be installed because it is not compatible with this version of ownCloud"));
}
// check if shipped tag is set which is only allowed for apps that are shipped with ownCloud
if(isset($info['shipped']) and ($info['shipped']=='true')) {
OC_Log::write('core',
'App can\'t be installed because it contains the <shipped>true</shippe>'
.' tag which is not allowed for non shipped apps',
OC_Log::ERROR);
OC_Helper::rmdirr($extractDir);
return false;
throw new \Exception($l->t("App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps"));
}
// check if the ocs version is the same as the version in info.xml/version
if(!isset($info['version']) or ($info['version']<>$data['appdata']['version'])) {
OC_Log::write('core',
'App can\'t be installed because the version in info.xml/version is not the same'
.' as the version reported from the app store',
OC_Log::ERROR);
OC_Helper::rmdirr($extractDir);
return false;
throw new \Exception($l->t("App can't be installed because the version in info.xml/version is not the same as the version reported from the app store"));