diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 3b3a57c3e9..f27db97f44 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -359,6 +359,7 @@ class Setup { $config = \OC::$server->getConfig(); $config->setAppValue('core', 'installedat', microtime(true)); $config->setAppValue('core', 'lastupdatedat', microtime(true)); + $config->setAppValue('core', 'vendor', $this->getVendor()); $group =\OC::$server->getGroupManager()->createGroup('admin'); $group->addUser($user); @@ -497,4 +498,18 @@ class Setup { file_put_contents($baseDir . '/.htaccess', $content); file_put_contents($baseDir . '/index.html', ''); } + + /** + * Return vendor from which this version was published + * + * @return string Get the vendor + * + * Copy of \OC\Updater::getVendor() + */ + private function getVendor() { + // this should really be a JSON file + require \OC::$SERVERROOT . '/version.php'; + /** @var string $vendor */ + return (string) $vendor; + } }