| @@ -76,12 +76,16 @@ | ||
| 76 | 76 | endif; |
| 77 | 77 | |
| 78 | 78 | if (isset($post['create_index'])) : |
| 79 | 79 | FeedWordPress::create_guid_index(); |
| 80 | - $this->updated = __('Index created on database table.'); | |
| 80 | + $this->updated = __('guid column index created on database table.'); | |
| 81 | 81 | endif; |
| 82 | - | |
| 83 | - if (isset($_POST['clear_cache'])) : | |
| 82 | + if (isset($post['remove_index'])) : | |
| 83 | + FeedWordPress::remove_guid_index(); | |
| 84 | + $this->updated = __('guid column index removed from database table.'); | |
| 85 | + endif; | |
| 86 | + | |
| 87 | + if (isset($post['clear_cache'])) : | |
| 84 | 88 | FeedWordPress::clear_cache(); |
| 85 | 89 | $this->updated = __("Cleared all cached feeds from WordPress database."); |
| 86 | 90 | endif; |
| 87 | 91 | } /* FeedWordPressBackendPage::accept_POST () */ |
| @@ -97,11 +101,23 @@ | ||
| 97 | 101 | and force FeedWordPress to make a fresh scan for updates on syndicated feeds.</p></td></tr> |
| 98 | 102 | |
| 99 | 103 | <tr style="vertical-align: top"> |
| 100 | 104 | <th width="33%" scope="row">Guid index:</th> |
| 101 | -<td width="67%"><input class="button" type="submit" name="create_index" value="Create index on guid column in posts database table" /> | |
| 105 | +<td width="67%"><?php if (!FeedWordPress::has_guid_index()) : ?> | |
| 106 | +<input class="button" type="submit" name="create_index" value="Create index on guid column in posts database table" /> | |
| 102 | 107 | <p>Creating this index may significantly improve performance on some large |
| 103 | -FeedWordPress installations.</p></td> | |
| 108 | +FeedWordPress installations.</p> | |
| 109 | +<?php else : ?> | |
| 110 | + | |
| 111 | +<p>You have already created an index on the guid column in the WordPress posts | |
| 112 | +table. If you'd like to remove the index for any reason, you can do so here.</p> | |
| 113 | + | |
| 114 | +<input class="button" type="submit" name="remove_index" value="Remove index on guid column in posts database table" /> | |
| 115 | + | |
| 116 | +<?php endif; ?> | |
| 117 | + | |
| 118 | + | |
| 119 | +</td> | |
| 104 | 120 | </tr> |
| 105 | 121 | </table> |
| 106 | 122 | <?php |
| 107 | 123 | } /* FeedWordPressBackendPage::performance_box () */ |