Code Duplication    Length = 6-7 lines in 2 locations

lib/private/util.php 2 locations

@@ 499-505 (lines=7) @@
496
		$webServerRestart = false;
497
		$setup = new OC_Setup($config);
498
		$availableDatabases = $setup->getSupportedDatabases();
499
		if (empty($availableDatabases)) {
500
			$errors[] = array(
501
				'error' => $l->t('No database drivers (sqlite, mysql, or postgresql) installed.'),
502
				'hint' => '' //TODO: sane hint
503
			);
504
			$webServerRestart = true;
505
		}
506
507
		// Check if config folder is writable.
508
		if (!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
@@ 638-643 (lines=6) @@
635
			);
636
		}
637
638
		if ($webServerRestart) {
639
			$errors[] = array(
640
				'error' => $l->t('PHP modules have been installed, but they are still listed as missing?'),
641
				'hint' => $l->t('Please ask your server administrator to restart the web server.')
642
			);
643
		}
644
645
		$errors = array_merge($errors, self::checkDatabaseVersion());
646