Code Duplication    Length = 5-6 lines in 2 locations

lib/private/legacy/util.php 1 location

@@ 430-435 (lines=6) @@
427
			
428
			// Allow overriding update channel
429
			
430
			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
431
				$channel = \OC::$server->getAppConfig()->getValue('core', 'OC_Channel');
432
			} else {
433
				/** @var $OC_Channel string */
434
				$channel = $OC_Channel;
435
			}
436
			
437
			if (!is_null($channel)) {
438
				$session->set('OC_Channel', $channel);

lib/private/Server.php 1 location

@@ 233-237 (lines=5) @@
230
			$timeFactory = new TimeFactory();
231
			// Token providers might require a working database. This code
232
			// might however be called when ownCloud is not yet setup.
233
			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
234
				$defaultTokenProvider = $c->query('OC\Authentication\Token\IProvider');
235
			} else {
236
				$defaultTokenProvider = null;
237
			}
238
			
239
			$userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $c->getConfig());
240
			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {