Skip to content
Snippets Groups Projects
Unverified Commit d5483295 authored by Morris Jobke's avatar Morris Jobke
Browse files

Set vendor during install


Signed-off-by: default avatarMorris Jobke <hey@morrisjobke.de>
parent 397feb9e
No related branches found
No related tags found
No related merge requests found
...@@ -357,6 +357,7 @@ class Setup { ...@@ -357,6 +357,7 @@ class Setup {
$config = \OC::$server->getConfig(); $config = \OC::$server->getConfig();
$config->setAppValue('core', 'installedat', microtime(true)); $config->setAppValue('core', 'installedat', microtime(true));
$config->setAppValue('core', 'lastupdatedat', microtime(true)); $config->setAppValue('core', 'lastupdatedat', microtime(true));
$config->setAppValue('core', 'vendor', $this->getVendor());
$group =\OC::$server->getGroupManager()->createGroup('admin'); $group =\OC::$server->getGroupManager()->createGroup('admin');
$group->addUser($user); $group->addUser($user);
...@@ -497,4 +498,18 @@ class Setup { ...@@ -497,4 +498,18 @@ class Setup {
file_put_contents($baseDir . '/.htaccess', $content); file_put_contents($baseDir . '/.htaccess', $content);
file_put_contents($baseDir . '/index.html', ''); 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;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment