| @@ 832-841 (lines=10) @@ | ||
| 829 | ) |
|
| 830 | ); |
|
| 831 | $context['fulltext_index'] = ''; |
|
| 832 | if ($request !== false || $smcFunc['db_num_rows']($request) != 0) |
|
| 833 | { |
|
| 834 | while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 835 | if ($row['Column_name'] == 'body' && (isset($row['Index_type']) && $row['Index_type'] == 'FULLTEXT' || isset($row['Comment']) && $row['Comment'] == 'FULLTEXT')) |
|
| 836 | $context['fulltext_index'][] = $row['Key_name']; |
|
| 837 | $smcFunc['db_free_result']($request); |
|
| 838 | ||
| 839 | if (is_array($context['fulltext_index'])) |
|
| 840 | $context['fulltext_index'] = array_unique($context['fulltext_index']); |
|
| 841 | } |
|
| 842 | ||
| 843 | if (preg_match('~^`(.+?)`\.(.+?)$~', $db_prefix, $match) !== 0) |
|
| 844 | $request = $smcFunc['db_query']('', ' |
|
| @@ 3718-3727 (lines=10) @@ | ||
| 3715 | $upcontext['dropping_index'] = false; |
|
| 3716 | ||
| 3717 | // If there's a fulltext index, we need to drop it first... |
|
| 3718 | if ($request !== false || $smcFunc['db_num_rows']($request) != 0) |
|
| 3719 | { |
|
| 3720 | while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 3721 | if ($row['Column_name'] == 'body' && (isset($row['Index_type']) && $row['Index_type'] == 'FULLTEXT' || isset($row['Comment']) && $row['Comment'] == 'FULLTEXT')) |
|
| 3722 | $upcontext['fulltext_index'][] = $row['Key_name']; |
|
| 3723 | $smcFunc['db_free_result']($request); |
|
| 3724 | ||
| 3725 | if (isset($upcontext['fulltext_index'])) |
|
| 3726 | $upcontext['fulltext_index'] = array_unique($upcontext['fulltext_index']); |
|
| 3727 | } |
|
| 3728 | ||
| 3729 | // Drop it and make a note... |
|
| 3730 | if (!empty($upcontext['fulltext_index'])) |
|