PluginProbe
FeedWordPress / 2017.0913
FeedWordPress v2017.0913
trunk 0.8 0.9 0.91 0.95 0.96 0.97 0.98 0.981 0.99 0.991 0.992 0.993 2008.1030 2008.1101 2008.1105 2008.1214 2009.0612 2009.0613 2009.0618 2009.0707 2009.1111 2009.1112 2010.0127 2010.0528 All 65 releases
← All changes | performance-page.php +13 -12 trunk2017.0913 View file →
@@ -11,8 +11,11 @@
11 11
12 12 public function has_link () { return false; }
13 13
14 14 function display () {
15 + global $wpdb, $wp_db_version, $fwp_path;
16 + global $fwp_post;
17 +
15 18 if (FeedWordPress::needs_upgrade()) :
16 19 fwp_upgrade_page();
17 20 return;
18 21 endif;
@@ -20,10 +23,10 @@
20 23 // If this is a POST, validate source and user credentials
21 24 FeedWordPressCompatibility::validate_http_request(/*action=*/ 'feedwordpress_performance', /*capability=*/ 'manage_options');
22 25
23 26 if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') :
24 - $this->accept_POST();
25 - do_action('feedwordpress_admin_page_performance_save', null, $this);
27 + $this->accept_POST($fwp_post);
28 + do_action('feedwordpress_admin_page_performance_save', $fwp_post, $this);
26 29 endif;
27 30
28 31 ////////////////////////////////////////////////
29 32 // Prepare settings page ///////////////////////
@@ -51,9 +54,9 @@
51 54 do_action('feedwordpress_admin_page_performance_meta_boxes', $this);
52 55 ?>
53 56 <div class="metabox-holder">
54 57 <?php
55 - do_meta_boxes($this->meta_box_context(), $this->meta_box_context(), $this);
58 + fwp_do_meta_boxes($this->meta_box_context(), $this->meta_box_context(), $this);
56 59 ?>
57 60 </div> <!-- class="metabox-holder" -->
58 61 </div> <!-- id="post-body" -->
59 62
@@ -60,24 +63,22 @@
60 63 <?php
61 64 $this->close_sheet();
62 65 } /* FeedWordPressPerformancePage::display () */
63 66
64 - function accept_POST () {
65 - global $feedwordpress;
66 -
67 - if ( ! is_null( FeedWordPress::post( 'create_index' ) ) ) :
67 + function accept_POST ($post) {
68 + if (isset($post['create_index'])) :
68 69 FeedWordPress::create_guid_index();
69 70 $this->updated = __('guid column index created on database table.');
70 71 endif;
71 - if ( ! is_null( FeedWordPress::post( 'remove_index' ) ) ) :
72 + if (isset($post['remove_index'])) :
72 73 FeedWordPress::remove_guid_index();
73 74 $this->updated = __('guid column index removed from database table.');
74 75 endif;
75 76
76 - if ( ! is_null( FeedWordPress::post( 'clear_cache' ) ) ) :
77 - $N = $feedwordpress->clear_cache();
77 + if (isset($post['clear_cache'])) :
78 + $N = FeedWordPress::clear_cache();
78 79 $feeds = (($N == 1) ? __("feed") : __("feeds"));
79 - $this->updated = sprintf( __("Cleared %d cached %s from WordPress database."), $N, $feeds );
80 + $this->updated = sprintf(__("Cleared %d cached %s from WordPress database."), $N, $feeds);
80 81 endif;
81 82
82 83 } /* FeedWordPressPerformancePage::accept_POST () */
83 84
@@ -93,9 +94,9 @@
93 94 and force FeedWordPress to make a fresh scan for updates on syndicated feeds.</p></td></tr>
94 95
95 96 <tr style="vertical-align: top">
96 97 <th width="33%" scope="row">Guid index:</th>
97 -<td width="67%"><?php if ( !FeedWordPress::has_guid_index()) : ?>
98 +<td width="67%"><?php if (!FeedWordPress::has_guid_index()) : ?>
98 99 <input class="button" type="submit" name="create_index" value="Create index on guid column in posts database table" />
99 100 <p>Creating this index may significantly improve performance on some large
100 101 FeedWordPress installations.</p>
101 102 <?php else : ?>