Signed-off-by: Joas Schilling <coding@schilljs.com>tags/v13.0.0beta1
public static function installShippedApp($app) { | public static function installShippedApp($app) { | ||||
//install the database | //install the database | ||||
$appPath = OC_App::getAppPath($app); | $appPath = OC_App::getAppPath($app); | ||||
\OC_App::registerAutoloading($app, $appPath); | |||||
if(is_file("$appPath/appinfo/database.xml")) { | if(is_file("$appPath/appinfo/database.xml")) { | ||||
try { | try { | ||||
OC_DB::createDbFromStructure("$appPath/appinfo/database.xml"); | OC_DB::createDbFromStructure("$appPath/appinfo/database.xml"); | ||||
} | } | ||||
//run appinfo/install.php | //run appinfo/install.php | ||||
\OC_App::registerAutoloading($app, $appPath); | |||||
self::includeAppScript("$appPath/appinfo/install.php"); | self::includeAppScript("$appPath/appinfo/install.php"); | ||||
$info = OC_App::getAppInfo($app); | $info = OC_App::getAppInfo($app); |
if($appPath === false) { | if($appPath === false) { | ||||
return false; | return false; | ||||
} | } | ||||
self::registerAutoloading($appId, $appPath); | |||||
$appData = self::getAppInfo($appId); | $appData = self::getAppInfo($appId); | ||||
self::executeRepairSteps($appId, $appData['repair-steps']['pre-migration']); | self::executeRepairSteps($appId, $appData['repair-steps']['pre-migration']); | ||||
self::loadApp($appId); | self::loadApp($appId); | ||||
include $appPath . '/appinfo/update.php'; | include $appPath . '/appinfo/update.php'; | ||||
} | } | ||||
self::registerAutoloading($appId, $appPath); | |||||
self::setupBackgroundJobs($appData['background-jobs']); | self::setupBackgroundJobs($appData['background-jobs']); | ||||
if(isset($appData['settings']) && is_array($appData['settings'])) { | if(isset($appData['settings']) && is_array($appData['settings'])) { | ||||
\OC::$server->getSettingsManager()->setupSettings($appData['settings']); | \OC::$server->getSettingsManager()->setupSettings($appData['settings']); |