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

@@ 2545-2554 (lines=10) @@
2542
		$upcontext['dropping_index'] = false;
2543
2544
		// If there's a fulltext index, we need to drop it first...
2545
		if ($request !== false || $smcFunc['db_num_rows']($request) != 0)
2546
		{
2547
			while ($row = $smcFunc['db_fetch_assoc']($request))
2548
				if ($row['Column_name'] == 'body' && (isset($row['Index_type']) && $row['Index_type'] == 'FULLTEXT' || isset($row['Comment']) && $row['Comment'] == 'FULLTEXT'))
2549
					$upcontext['fulltext_index'][] = $row['Key_name'];
2550
			$smcFunc['db_free_result']($request);
2551
2552
			if (isset($upcontext['fulltext_index']))
2553
				$upcontext['fulltext_index'] = array_unique($upcontext['fulltext_index']);
2554
		}
2555
2556
		// Drop it and make a note...
2557
		if (!empty($upcontext['fulltext_index']))