summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Setup.php')
-rw-r--r--lib/private/Setup.php20
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