summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-02-09 23:37:00 -0600
committerMorris Jobke <hey@morrisjobke.de>2017-02-09 23:37:00 -0600
commitd548329543b6cbda2686a8523e163c8a87b2ab09 (patch)
tree2e88302142b670d2ef00e3d698edd9e47b5e9b08 /lib
parent397feb9e8ddefcb04ac201bc64fa04ac9b41c7ca (diff)
downloadnextcloud-server-d548329543b6cbda2686a8523e163c8a87b2ab09.tar.gz
nextcloud-server-d548329543b6cbda2686a8523e163c8a87b2ab09.zip
Set vendor during install
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Setup.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index d9997767684..321e8ea4c66 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -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;
+ }
}