| @@ 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']('', ' |
|
| @@ 2522-2531 (lines=10) @@ | ||
| 2519 | $upcontext['dropping_index'] = false; |
|
| 2520 | ||
| 2521 | // If there's a fulltext index, we need to drop it first... |
|
| 2522 | if ($request !== false || $smcFunc['db_num_rows']($request) != 0) |
|
| 2523 | { |
|
| 2524 | while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 2525 | if ($row['Column_name'] == 'body' && (isset($row['Index_type']) && $row['Index_type'] == 'FULLTEXT' || isset($row['Comment']) && $row['Comment'] == 'FULLTEXT')) |
|
| 2526 | $upcontext['fulltext_index'][] = $row['Key_name']; |
|
| 2527 | $smcFunc['db_free_result']($request); |
|
| 2528 | ||
| 2529 | if (isset($upcontext['fulltext_index'])) |
|
| 2530 | $upcontext['fulltext_index'] = array_unique($upcontext['fulltext_index']); |
|
| 2531 | } |
|
| 2532 | ||
| 2533 | // Drop it and make a note... |
|
| 2534 | if (!empty($upcontext['fulltext_index'])) |
|