diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-04-23 22:10:17 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-04-26 20:07:49 +0200 |
commit | 47cd9760350baaf24bdf92c7a77129e59ec2f8f3 (patch) | |
tree | c7e81c5440588267a6a275dbd661b07b3363dea8 /lib/private/Setup.php | |
parent | 646db7f88d911459bdfa038d8a66ded27ae888a4 (diff) | |
download | nextcloud-server-47cd9760350baaf24bdf92c7a77129e59ec2f8f3.tar.gz nextcloud-server-47cd9760350baaf24bdf92c7a77129e59ec2f8f3.zip |
Add app bundles
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/Setup.php')
-rw-r--r-- | lib/private/Setup.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php index e2806efad48..b1cf289d9aa 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -41,6 +41,7 @@ namespace OC; use bantu\IniGetWrapper\IniGetWrapper; use Exception; +use OC\App\AppStore\Bundles\BundleFetcher; use OCP\Defaults; use OCP\IL10N; use OCP\ILogger; @@ -63,11 +64,12 @@ class Setup { /** * @param SystemConfig $config * @param IniGetWrapper $iniWrapper + * @param IL10N $l10n * @param Defaults $defaults * @param ILogger $logger * @param ISecureRandom $random */ - function __construct(SystemConfig $config, + public function __construct(SystemConfig $config, IniGetWrapper $iniWrapper, IL10N $l10n, Defaults $defaults, @@ -364,8 +366,22 @@ class Setup { $group =\OC::$server->getGroupManager()->createGroup('admin'); $group->addUser($user); - //guess what this does + // Install shipped apps and specified app bundles Installer::installShippedApps(); + $installer = new Installer( + \OC::$server->getAppFetcher(), + \OC::$server->getHTTPClientService(), + \OC::$server->getTempManager(), + \OC::$server->getLogger(), + \OC::$server->getConfig() + ); + $bundleFetcher = new BundleFetcher(\OC::$server->getL10N('lib')); + $defaultInstallationBundles = $bundleFetcher->getDefaultInstallationBundle(); + foreach($defaultInstallationBundles as $bundle) { + try { + $installer->installAppBundle($bundle); + } catch (Exception $e) {} + } // create empty file in data dir, so we can later find // out that this is indeed an ownCloud data directory |