Set vendor during install

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-02-09 23:37:00 -06:00
parent 397feb9e8d
commit d548329543
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 15 additions and 0 deletions

View File

@ -357,6 +357,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;
}
}