Code Duplication    Length = 10-10 lines in 2 locations

Sources/ManageSearch.php 1 location

@@ 834-843 (lines=10) @@
831
			)
832
		);
833
		$context['fulltext_index'] = '';
834
		if ($request !== false || $smcFunc['db_num_rows']($request) != 0)
835
		{
836
			while ($row = $smcFunc['db_fetch_assoc']($request))
837
			if ($row['Column_name'] == 'body' && (isset($row['Index_type']) && $row['Index_type'] == 'FULLTEXT' || isset($row['Comment']) && $row['Comment'] == 'FULLTEXT'))
838
				$context['fulltext_index'][] = $row['Key_name'];
839
			$smcFunc['db_free_result']($request);
840
841
			if (is_array($context['fulltext_index']))
842
				$context['fulltext_index'] = array_unique($context['fulltext_index']);
843
		}
844
845
		if (preg_match('~^`(.+?)`\.(.+?)$~', $db_prefix, $match) !== 0)
846
			$request = $smcFunc['db_query']('', '

other/upgrade.php 1 location

@@ 2509-2518 (lines=10) @@
2506
		$upcontext['dropping_index'] = false;
2507
2508
		// If there's a fulltext index, we need to drop it first...
2509
		if ($request !== false || $smcFunc['db_num_rows']($request) != 0)
2510
		{
2511
			while ($row = $smcFunc['db_fetch_assoc']($request))
2512
				if ($row['Column_name'] == 'body' && (isset($row['Index_type']) && $row['Index_type'] == 'FULLTEXT' || isset($row['Comment']) && $row['Comment'] == 'FULLTEXT'))
2513
					$upcontext['fulltext_index'][] = $row['Key_name'];
2514
			$smcFunc['db_free_result']($request);
2515
2516
			if (isset($upcontext['fulltext_index']))
2517
				$upcontext['fulltext_index'] = array_unique($upcontext['fulltext_index']);
2518
		}
2519
2520
		// Drop it and make a note...
2521
		if (!empty($upcontext['fulltext_index']))