@@ -393,7 +393,12 @@ public function install($options) {
393
393
$ config = \OC ::$ server ->getConfig ();
394
394
$ config ->setAppValue ('core ' , 'installedat ' , microtime (true ));
395
395
$ config ->setAppValue ('core ' , 'lastupdatedat ' , microtime (true ));
396
- $ config ->setAppValue ('core ' , 'vendor ' , $ this ->getVendor ());
396
+
397
+ $ vendorData = $ this ->getVendorData ();
398
+ $ config ->setAppValue ('core ' , 'vendor ' , $ vendorData ['vendor ' ]);
399
+ if ($ vendorData ['channel ' ] !== 'stable ' ) {
400
+ $ config ->setSystemValue ('updater.release.channel ' , $ vendorData ['channel ' ]);
401
+ }
397
402
398
403
$ group = \OC ::$ server ->getGroupManager ()->createGroup ('admin ' );
399
404
if ($ group instanceof IGroup) {
@@ -582,17 +587,14 @@ public static function protectDataDirectory() {
582
587
file_put_contents ($ baseDir . '/index.html ' , '' );
583
588
}
584
589
585
- /**
586
- * Return vendor from which this version was published
587
- *
588
- * @return string Get the vendor
589
- *
590
- * Copy of \OC\Updater::getVendor()
591
- */
592
- private function getVendor () {
590
+ private function getVendorData (): array {
593
591
// this should really be a JSON file
594
592
require \OC ::$ SERVERROOT . '/version.php ' ;
595
- /** @var string $vendor */
596
- return (string )$ vendor ;
593
+ /** @var mixed $vendor */
594
+ /** @var mixed $OC_Channel */
595
+ return [
596
+ 'vendor ' => (string )$ vendor ,
597
+ 'channel ' => (string )$ OC_Channel ,
598
+ ];
597
599
}
598
600
}
0 commit comments