| @@ 820-829 (lines=10) @@ | ||
| 817 | ) |
|
| 818 | ); |
|
| 819 | $context['fulltext_index'] = array(); |
|
| 820 | if ($request !== false || $smcFunc['db_num_rows']($request) != 0) |
|
| 821 | { |
|
| 822 | while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 823 | if ($row['Column_name'] == 'body' && (isset($row['Index_type']) && $row['Index_type'] == 'FULLTEXT' || isset($row['Comment']) && $row['Comment'] == 'FULLTEXT')) |
|
| 824 | $context['fulltext_index'][] = $row['Key_name']; |
|
| 825 | $smcFunc['db_free_result']($request); |
|
| 826 | ||
| 827 | if (is_array($context['fulltext_index'])) |
|
| 828 | $context['fulltext_index'] = array_unique($context['fulltext_index']); |
|
| 829 | } |
|
| 830 | ||
| 831 | if (preg_match('~^`(.+?)`\.(.+?)$~', $db_prefix, $match) !== 0) |
|
| 832 | $request = $smcFunc['db_query']('', ' |
|
| @@ 2678-2687 (lines=10) @@ | ||
| 2675 | $upcontext['dropping_index'] = false; |
|
| 2676 | ||
| 2677 | // If there's a fulltext index, we need to drop it first... |
|
| 2678 | if ($request !== false || $smcFunc['db_num_rows']($request) != 0) |
|
| 2679 | { |
|
| 2680 | while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 2681 | if ($row['Column_name'] == 'body' && (isset($row['Index_type']) && $row['Index_type'] == 'FULLTEXT' || isset($row['Comment']) && $row['Comment'] == 'FULLTEXT')) |
|
| 2682 | $upcontext['fulltext_index'][] = $row['Key_name']; |
|
| 2683 | $smcFunc['db_free_result']($request); |
|
| 2684 | ||
| 2685 | if (isset($upcontext['fulltext_index'])) |
|
| 2686 | $upcontext['fulltext_index'] = array_unique($upcontext['fulltext_index']); |
|
| 2687 | } |
|
| 2688 | ||
| 2689 | // Drop it and make a note... |
|
| 2690 | if (!empty($upcontext['fulltext_index'])) |
|