diff --git a/wp-content/plugins/feedwordpress/admin-ui.php b/wp-content/plugins/feedwordpress/admin-ui.php index 8256a9450edad44fab9001379747f73bad771cee..478db9f09522484ce6c67e878a254fa7f65747ff 100644 --- a/wp-content/plugins/feedwordpress/admin-ui.php +++ b/wp-content/plugins/feedwordpress/admin-ui.php @@ -241,6 +241,38 @@ class FeedWordPressAdminPage { <?php } /* FeedWordPressAdminPage::ajax_interface_js () */ + function admin_page_href ($page, $params = array(), $link = NULL) { + global $fwp_path; + + // Merge in the page's filename + $params = array_merge($params, array('page' => $fwp_path.'/'.$page)); + + // If there is a link ID provided, then merge that in too. + if (!is_null($link)) : + $link_id = NULL; + if (is_object($link)) : + if (method_exists($link, 'found')) : + // Is this a SyndicatedLink object? + if ($link->found()) : + $link_id = $link->link->link_id; + endif; + else : + // Is this a wp_links table record? + $link_id = $link->link_id; + endif; + else : + // Is this just a numeric ID? + $link_id = $link; + endif; + + if (!is_null($link_id)) : + $params = array_merge($params, array('link_id' => $link_id)); + endif; + endif; + + return MyPHP::url(admin_url('admin.php'), $params); + } /* FeedWordPressAdminPage::admin_page_href () */ + function display_feed_settings_page_links ($params = array()) { global $fwp_path; @@ -260,8 +292,6 @@ class FeedWordPressAdminPage { 'Categories' => array('page' => 'categories-page.php', 'long' => 'Categories & Tags'), ); - $hrefPrefix = 'admin.php?'; - $link_id = NULL; if (is_object($sub)) : if (method_exists($sub, 'found')) : @@ -273,21 +303,12 @@ class FeedWordPressAdminPage { endif; endif; - if (!is_null($link_id)) : - $urlParam = "link_id={$link_id}"; - $hrefPrefix .= $urlParam."&"; - $urlSuffix = "&".$urlParam; - else : - $urlParam = ''; - endif; - $hrefPrefix .= "page=${fwp_path}/"; - print $params['before']; $first = true; foreach ($links as $label => $link) : if (!$first) : print $params['between']; endif; - if (isset($link['url'])) : $url = $link['url'].$urlSuffix; - else : $url = $hrefPrefix.$link['page']; + if (isset($link['url'])) : MyPHP::url($link['url'], array("link_id" => $link_id)); + else : $url = $this->admin_page_href($link['page'], array(), $sub); endif; $url = esc_html($url); @@ -345,8 +366,9 @@ class FeedWordPressAdminPage { } /* FeedWordPressAdminPage::display_feed_select_dropdown() */ function display_sheet_header ($pagename = 'Syndication', $all = false) { + global $fwp_path; ?> - <div class="icon32"><img src="<?php print esc_html(WP_PLUGIN_URL.'/'.$GLOBALS['fwp_path'].'/feedwordpress.png'); ?>" alt="" /></div> + <div class="icon32"><img src="<?php print esc_html(WP_PLUGIN_URL.'/'.$fwp_path.'/feedwordpress.png'); ?>" alt="" /></div> <h2><?php print esc_html(__($pagename.($all ? '' : ' Settings'))); ?><?php if ($this->for_feed_settings()) : ?>: <?php echo esc_html($this->link->name(/*from feed=*/ false)); ?><?php endif; ?></h2> <?php } @@ -395,7 +417,7 @@ class FeedWordPressAdminPage { if (is_null($filename)) : $filename = basename($this->filename); endif; - return "admin.php?page=${fwp_path}/".$filename; + return $this->admin_page_href($filename); } /* FeedWordPressAdminPage::form_action () */ function update_message () { @@ -403,6 +425,8 @@ class FeedWordPressAdminPage { } function display () { + global $fwp_post; + if (FeedWordPress::needs_upgrade()) : fwp_upgrade_page(); return; @@ -414,7 +438,7 @@ class FeedWordPressAdminPage { // Process POST request, if any //////////////// //////////////////////////////////////////////// if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') : - $this->accept_POST($GLOBALS['fwp_post']); + $this->accept_POST($fwp_post); else : $this->updated = false; endif; @@ -539,7 +563,7 @@ class FeedWordPressAdminPage { endif; if (isset($params['site-wide-url'])) : $href = $params['site-wide-url']; - else : $href = "admin.php?page=${fwp_path}/${filename}"; + else : $href = $this->admin_page_href($filename); endif; if (isset($params['setting-default'])) : $settingDefault = $params['setting-default']; @@ -1072,7 +1096,6 @@ function fwp_remove_meta_box($id, $page, $context) { } /* function fwp_remove_meta_box() */ function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible = 'Y') { - global $fwp_path; $subscribed = ('Y' == strtoupper($visible)); if ($subscribed or (count($links) > 0)) : @@ -1183,7 +1206,6 @@ function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible = <tr<?php echo ((count($trClass) > 0) ? ' class="'.implode(" ", $trClass).'"':''); ?>> <th class="check-column" scope="row"><input type="checkbox" name="link_ids[]" value="<?php echo $link->link_id; ?>" /></th> <?php - $hrefPrefix = "admin.php?link_id={$link->link_id}&page=${fwp_path}/"; $caption = ( (strlen($link->link_rss) > 0) ? __('Switch Feed') @@ -1191,7 +1213,7 @@ function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible = ); ?> <td> - <strong><a href="<?php print $hrefPrefix; ?>feeds-page.php"><?php print esc_html($link->link_name); ?></a></strong> + <strong><a href="<?php print $page->admin_page_href('feeds-page.php', array(), $link); ?>"><?php print esc_html($link->link_name); ?></a></strong> <div class="row-actions"><?php if ($subscribed) : $page->display_feed_settings_page_links(array( 'before' => '<div><strong>Settings ></strong> ', @@ -1202,11 +1224,11 @@ function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible = <div><strong>Actions ></strong> <?php if ($subscribed) : ?> - <a href="<?php print $hrefPrefix; ?>syndication.php&action=feedfinder"><?php echo $caption; ?></a> + <a href="<?php print $page->admin_page_href('syndication.php', array('action' => 'feedfinder'), $link); ?>"><?php echo $caption; ?></a> <?php else : ?> - <a href="<?php print $hrefPrefix; ?>syndication.php&action=<?php print FWP_RESUB_CHECKED; ?>"><?php _e('Re-subscribe'); ?></a> + <a href="<?php print $page->admin_page_href('syndication.php', array('action' => FWP_RESUB_CHECKED), $link); ?>"><?php _e('Re-subscribe'); ?></a> <?php endif; ?> - | <a href="<?php print $hrefPrefix; ?>syndication.php&action=Unsubscribe"><?php _e(($subscribed ? 'Unsubscribe' : 'Delete permanently')); ?></a> + | <a href="<?php print $page->admin_page_href('syndication.php', array('action' => 'Unsubscribe'), $link); ?>"><?php _e(($subscribed ? 'Unsubscribe' : 'Delete permanently')); ?></a> | <a href="<?php print esc_html($link->link_url); ?>"><?php _e('View')?></a></div> </div> </td> @@ -1239,19 +1261,3 @@ function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible = endif; } /* function fwp_syndication_manage_page_links_table_rows () */ -function fwp_syndication_manage_page_links_subsubsub ($sources, $showInactive) { - global $fwp_path; - $hrefPrefix = "admin.php?page=${fwp_path}/syndication.php"; - ?> - <ul class="subsubsub"> - <li><a <?php if (!$showInactive) : ?>class="current" <?php endif; ?>href="<?php print $hrefPrefix; ?>&visibility=Y">Subscribed - <span class="count">(<?php print count($sources['Y']); ?>)</span></a></li> - <?php if ($showInactive or (count($sources['N']) > 0)) : ?> - <li><a <?php if ($showInactive) : ?>class="current" <?php endif; ?>href="<?php print $hrefPrefix; ?>&visibility=N">Inactive</a> - <span class="count">(<?php print count($sources['N']); ?>)</span></a></li> - <?php endif; ?> - - </ul> <!-- class="subsubsub" --> - <?php -} - diff --git a/wp-content/plugins/feedwordpress/categories-page.php b/wp-content/plugins/feedwordpress/categories-page.php index 528a81ef8d306ce77fcd1e992091e6674afc4203..3eb5515d5cffc45f49589aefaf6551f3bcae4524 100644 --- a/wp-content/plugins/feedwordpress/categories-page.php +++ b/wp-content/plugins/feedwordpress/categories-page.php @@ -100,7 +100,7 @@ class FeedWordPressCategoriesPage extends FeedWordPressAdminPage { endforeach; if ($this->for_feed_settings()) : - $href = "admin.php?page={$GLOBALS['fwp_path']}/".basename(__FILE__); + $href = $this->admin_page_href(basename(__FILE__)); foreach ($unmatched as $what => $um) : // Is the global default setting appropriate to this post type? @@ -450,7 +450,8 @@ blank.</p></td> $globalDogs = SyndicatedPost::category_ids($globalCats, /*unfamiliar=*/ 'create:'.$tax, /*taxonomies=*/ array($tax)); - $siteWideHref = 'admin.php?page='.$GLOBALS['fwp_path'].'/'.basename(__FILE__); + $siteWideHref = $this->admin_page_href(basename(__FILE__)); + if ($page->for_feed_settings()) : ?> </td> diff --git a/wp-content/plugins/feedwordpress/compatability.php b/wp-content/plugins/feedwordpress/compatability.php index 6b62752f2e104146073898ab5f52fbae469bb642..d108a02b7b331fd234703a50def300d1c24b9824 100644 --- a/wp-content/plugins/feedwordpress/compatability.php +++ b/wp-content/plugins/feedwordpress/compatability.php @@ -177,7 +177,7 @@ function fwp_time_elapsed ($ts) { ################################################################################ function fwp_upgrade_page () { - if (isset($GLOBALS['fwp_post']['action']) and $GLOBALS['fwp_post']['action']=='Upgrade') : + if (MyPHP::post('action')=='Upgrade') : $ver = get_option('feedwordpress_version'); if (get_option('feedwordpress_version') != FEEDWORDPRESS_VERSION) : echo "<div class=\"wrap\">\n"; diff --git a/wp-content/plugins/feedwordpress/diagnostics-page.php b/wp-content/plugins/feedwordpress/diagnostics-page.php index ec74b2ec39f2fede1cf9c653111c54047ce5e3eb..2c12b8e02dea1d0392b8114fe17a92f602577cf6 100644 --- a/wp-content/plugins/feedwordpress/diagnostics-page.php +++ b/wp-content/plugins/feedwordpress/diagnostics-page.php @@ -28,7 +28,7 @@ class FeedWordPressDiagnosticsPage extends FeedWordPressAdminPage { if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') : $this->accept_POST($fwp_post); - do_action('feedwordpress_admin_page_diagnostics_save', $GLOBALS['fwp_post'], $this); + do_action('feedwordpress_admin_page_diagnostics_save', $fwp_post, $this); endif; //////////////////////////////////////////////// diff --git a/wp-content/plugins/feedwordpress/externals/myphp/myphp.class.php b/wp-content/plugins/feedwordpress/externals/myphp/myphp.class.php new file mode 100644 index 0000000000000000000000000000000000000000..9d37e54b51d840012eb26cd6bd9c02efde46a7da --- /dev/null +++ b/wp-content/plugins/feedwordpress/externals/myphp/myphp.class.php @@ -0,0 +1,88 @@ +<?php +if (!class_exists('MyPHP')) : + class MyPHP { + // For dealing with HTTP GET/POST parameters sent to us as input + static public function param ($key, $default = NULL, $type = 'REQUEST') { + // PHP 5.4 introduces "just-in-time" initialization of + // $GLOBALS. Which seems to me largely to defeat the + // purpose of the $GLOBALS array. But whatever. Force + // $_GET, $_POST, and $_REQUEST into the array. + global $_GET, $_POST, $_REQUEST; + + $where = '_'.strtoupper($type); + $ret = $default; + if (isset($GLOBALS[$where]) and is_array($GLOBALS[$where])) : + if (isset($GLOBALS[$where][$key])) : + $ret = $GLOBALS[$where][$key]; + + // Magic quotes are like the stupidest + // thing ever. + if (get_magic_quotes_gpc()) : + $ret = self::stripslashes_deep($ret); + endif; + endif; + endif; + + return $ret; + } /* MyPHP::param () */ + + static function post ($key, $default = NULL) { + return self::param($key, $default, 'POST'); + } /*MyPHP::post () */ + + static function get ($key, $default = NULL) { + return self::param($key, $default, "GET"); + } /* MyPHP::get () */ + + static function request ($key, $default = NULL) { + return self::param($key, $default, "REQUEST"); + } /* MyPHP::request () */ + + static function stripslashes_deep ($value) { + if ( is_array($value) ) { + $value = array_map(array(__CLASS__, 'stripslashes_deep'), $value); + } elseif ( is_object($value) ) { + $vars = get_object_vars( $value ); + foreach ($vars as $key=>$data) { + $value->{$key} = stripslashes_deep( $data ); + } + } else { + $value = stripslashes($value); + } + return $value; + } /* MyPHP::stripslashes_deep () */ + + static function url ($url, $params = array()) { + $sep = '?'; + if (strpos($url, '?') !== false) : + $sep = '&'; + endif; + $url .= $sep . self::to_http_post($params); + + return $url; + } /* MyPHP::url () */ + + /** + * MyPHP::to_http_post () -- convert a hash table or object into + * an application/x-www-form-urlencoded query string + */ + static function to_http_post ($params) { + $getQuery = array(); + foreach ($params as $key => $value) : + if (is_scalar($value)) : + $getQuery[] = urlencode($key) . '=' . urlencode($value); + else : + // Make some attempt to deal with array and + // object members. Really we should descend + // recursively to get the whole thing.... + foreach ((array) $value as $k => $v) : + $getQuery[] = urlencode($key.'['.$k.']') . '=' . urlencode($v); + endforeach; + endif; + endforeach; + return implode("&", $getQuery); + } /* MyPHP::to_http_post () */ + } +endif; + + diff --git a/wp-content/plugins/feedwordpress/feeds-page.php b/wp-content/plugins/feedwordpress/feeds-page.php index 491c93d4e0f9c3778180d6df9f17885d30a72b3a..a87360669e51df957d36f83c3d5d71e2d68a5e5d 100644 --- a/wp-content/plugins/feedwordpress/feeds-page.php +++ b/wp-content/plugins/feedwordpress/feeds-page.php @@ -711,11 +711,12 @@ class FeedWordPressFeedsPage extends FeedWordPressAdminPage { } /* FeedWordPressFeedsPage::feed_information_box() */ function custom_settings_box ($page, $box = NULL) { + $postsSettings = $this->admin_page_href('posts-page.php', array(), $page->link); ?> <p class="setting-description">These custom settings are special fields for the <strong>feed</strong> you are syndicating, to be retrieved in templates using the <code>get_feed_meta()</code> function. They do not create custom fields on syndicated <strong>posts</strong>. If you want to create custom fields that are applied to each - individual post from this feed, set up the settings in <a href="admin.php?page=<?php print $GLOBALS['fwp_path'] ?>/posts-page.php&link_id=<?php print $page->link->id; ?>">Syndicated Posts</a>.</p> + individual post from this feed, set up the settings in <a href="<?php print $postsSettings; ?>">Syndicated Posts</a>.</p> <div id="postcustomstuff"> <table id="meta-list" cellpadding="3"> @@ -900,7 +901,7 @@ class FeedWordPressFeedsPage extends FeedWordPressAdminPage { $feed_version = ''; endif; ?> - <form<?php print $form_class; ?> action="admin.php?page=<?php print $GLOBALS['fwp_path'] ?>/syndication.php" method="post"> + <form<?php print $form_class; ?> action="<?php $this->form_action('syndication.php'); ?>" method="post"> <div class="inside"><?php FeedWordPressCompatibility::stamp_nonce('feedwordpress_switchfeed'); ?> <?php @@ -1068,7 +1069,7 @@ class FeedWordPressFeedsPage extends FeedWordPressAdminPage { $alt = $params['alt']; ?> - <form action="admin.php?page=<?php print $GLOBALS['fwp_path'] ?>/<?php echo basename(__FILE__); ?>" method="post"> + <form action="<?php $this->form_action(); ?>" method="post"> <div class="inside"><?php FeedWordPressCompatibility::stamp_nonce($this->dispatch); ?> diff --git a/wp-content/plugins/feedwordpress/feedwordpress.php b/wp-content/plugins/feedwordpress/feedwordpress.php index ca1311090db739f140acfcb407a5b6f5e10a902b..75506b80843dc819d7baa46503fa5b138fb2ac31 100644 --- a/wp-content/plugins/feedwordpress/feedwordpress.php +++ b/wp-content/plugins/feedwordpress/feedwordpress.php @@ -3,7 +3,7 @@ Plugin Name: FeedWordPress Plugin URI: http://feedwordpress.radgeek.com/ Description: simple and flexible Atom/RSS syndication for WordPress -Version: 2013.0502 +Version: 2013.0504 Author: Charles Johnson Author URI: http://radgeek.com/ License: GPL @@ -11,7 +11,7 @@ License: GPL /** * @package FeedWordPress - * @version 2013.0502 + * @version 2013.0504 */ # This uses code derived from: @@ -32,7 +32,7 @@ License: GPL # -- Don't change these unless you know what you're doing... -define ('FEEDWORDPRESS_VERSION', '2013.0502'); +define ('FEEDWORDPRESS_VERSION', '2013.0504'); define ('FEEDWORDPRESS_AUTHOR_CONTACT', 'http://radgeek.com/contact'); if (!defined('FEEDWORDPRESS_BLEG')) : @@ -794,14 +794,15 @@ function fwp_publish_post_hook ($post_id) { function feedwordpress_add_post_edit_controls () { global $feedwordpress; - + global $inspectPostMeta; + // Put in Manual Editing checkbox add_meta_box('feedwordpress-post-controls', __('Syndication'), 'feedwordpress_post_edit_controls', 'post', 'side', 'high'); add_filter('user_can_richedit', array($feedwordpress, 'user_can_richedit'), 1000, 1); if (FeedWordPress::diagnostic_on('syndicated_posts:static_meta_data')) : - $GLOBALS['inspectPostMeta'] = new InspectPostMeta; + $inspectPostMeta = new InspectPostMeta; endif; } // function FeedWordPress::postEditControls diff --git a/wp-content/plugins/feedwordpress/feedwordpress_file.class.php b/wp-content/plugins/feedwordpress/feedwordpress_file.class.php index 9130a710bb1092fa00d69c72bc657035f0143a45..542e3962b6a64050279ade7af2a4d289a79d6e1e 100644 --- a/wp-content/plugins/feedwordpress/feedwordpress_file.class.php +++ b/wp-content/plugins/feedwordpress/feedwordpress_file.class.php @@ -1,5 +1,7 @@ <?php -$GLOBALS['fwp_credentials'] = NULL; +global $fwp_credentials; + +$fwp_credentials = NULL; class FeedWordPress_File extends WP_SimplePie_File { function FeedWordPress_File ($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) { diff --git a/wp-content/plugins/feedwordpress/feedwordpresslocalpost.class.php b/wp-content/plugins/feedwordpress/feedwordpresslocalpost.class.php index 6ff8af497a06b5392fa1a99b13bb4a690a28277a..94cc928088d8279e9e428b9b77937cdcd664fac7 100644 --- a/wp-content/plugins/feedwordpress/feedwordpresslocalpost.class.php +++ b/wp-content/plugins/feedwordpress/feedwordpresslocalpost.class.php @@ -91,7 +91,8 @@ class FeedWordPressLocalPost { } public function feed () { - return $GLOBALS['feedwordpress']->subscription($this->feed_id()); + global $feedwordpress; + return $feedwordpress->subscription($this->feed_id()); } public function feed_id () { diff --git a/wp-content/plugins/feedwordpress/feedwordpresssyndicationpage.class.php b/wp-content/plugins/feedwordpress/feedwordpresssyndicationpage.class.php index e60e704e6d655612aa4087220c5842662142598e..301e644bfeffd51c047c9fac1b696c4db614505d 100644 --- a/wp-content/plugins/feedwordpress/feedwordpresssyndicationpage.class.php +++ b/wp-content/plugins/feedwordpress/feedwordpresssyndicationpage.class.php @@ -431,7 +431,7 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage { // Hey ho, let's go... ?> - <div style="float: left; background: #F5F5F5; padding-top: 5px; padding-right: 5px;"><a href="<?php print $this->form_action(); ?>"><img src="<?php print esc_html(WP_PLUGIN_URL.'/'.$GLOBALS['fwp_path'].'/feedwordpress.png'); ?>" alt="" /></a></div> + <div style="float: left; background: #F5F5F5; padding-top: 5px; padding-right: 5px;"><a href="<?php print $this->form_action(); ?>"><img src="<?php print esc_html(WP_PLUGIN_URL."/${fwp_path}/feedwordpress.png"); ?>" alt="" /></a></div> <p class="info" style="margin-bottom: 0px; border-bottom: 1px dotted black;">Managed by <a href="http://feedwordpress.radgeek.com/">FeedWordPress</a> <?php print FEEDWORDPRESS_VERSION; ?>.</p> @@ -567,7 +567,7 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage { <div class="alignleft"> <?php if (count($sources[$visibility]) > 0) : - fwp_syndication_manage_page_links_subsubsub($sources, $showInactive); + $this->manage_page_links_subsubsub($sources, $showInactive); endif; ?> </div> <!-- class="alignleft" --> @@ -590,9 +590,7 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage { if (count($sources[$visibility]) > 0) : $this->display_button_bar($showInactive); else : - ?> - <?php fwp_syndication_manage_page_links_subsubsub($sources, $showInactive); ?> - <?php + $this->manage_page_links_subsubsub($sources, $showInactive); endif; fwp_syndication_manage_page_links_table_rows($sources[$visibility], $this, $visibility); @@ -601,7 +599,22 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage { </form> <?php } /* FeedWordPressSyndicationPage::syndicated_sources_box() */ - + + function manage_page_links_subsubsub ($sources, $showInactive) { + $hrefPrefix = $this->admin_page_href("syndication.php"); +?> + <ul class="subsubsub"> + <li><a <?php if (!$showInactive) : ?>class="current" <?php endif; ?>href="<?php print $hrefPrefix; ?>&visibility=Y">Subscribed + <span class="count">(<?php print count($sources['Y']); ?>)</span></a></li> + <?php if ($showInactive or (count($sources['N']) > 0)) : ?> + <li><a <?php if ($showInactive) : ?>class="current" <?php endif; ?>href="<?php print $hrefPrefix; ?>&visibility=N">Inactive</a> + <span class="count">(<?php print count($sources['N']); ?>)</span></a></li> + <?php endif; ?> + + </ul> <!-- class="subsubsub" --> +<?php + } + function display_button_bar ($showInactive) { ?> <div style="clear: left" class="alignleft"> @@ -650,7 +663,7 @@ support, and documentation.</p> <input type="hidden" name="cmd" value="_xclick" /> <input type="hidden" name="item_name" value="FeedWordPress donation" /> <input type="hidden" name="no_shipping" value="1" /> -<input type="hidden" name="return" value="<?php print admin_url('admin.php'); ?>?page=<?php print $GLOBALS['fwp_path'] ?>/<?php print basename($this->filename); ?>&paid=yes" /> +<input type="hidden" name="return" value="<?php print esc_attr($this->admin_page_href(basename($this->filename), array('paid' => 'yes'))); ?>" /> <input type="hidden" name="currency_code" value="USD" /> <input type="hidden" name="notify_url" value="http://feedwordpress.radgeek.com/ipn/donation" /> <input type="hidden" name="custom" value="1" /> @@ -682,21 +695,20 @@ regular donation</a>) using an existing PayPal account or any major credit card. function multidelete_page () { global $wpdb; - global $fwp_post; // If this is a POST, validate source and user credentials FeedWordPressCompatibility::validate_http_request(/*action=*/ 'feedwordpress_feeds', /*capability=*/ 'manage_links'); - if (isset($fwp_post['submit']) and $fwp_post['submit']==FWP_CANCEL_BUTTON) : + if (MyPHP::post('submit')==FWP_CANCEL_BUTTON) : return true; // Continue without further ado. endif; $link_ids = (isset($_REQUEST['link_ids']) ? $_REQUEST['link_ids'] : array()); if (isset($_REQUEST['link_id'])) : array_push($link_ids, $_REQUEST['link_id']); endif; - if (isset($GLOBALS['fwp_post']['confirm']) and $GLOBALS['fwp_post']['confirm']=='Delete'): - if (isset($GLOBALS['fwp_post']['link_action']) and is_array($GLOBALS['fwp_post']['link_action'])) : - $actions = $GLOBALS['fwp_post']['link_action']; + if (MyPHP::post('confirm')=='Delete'): + if ( is_array(MyPHP::post('link_action')) ) : + $actions = MyPHP::post('link_action'); else : $actions = array(); endif; @@ -862,9 +874,9 @@ regular donation</a>) using an existing PayPal account or any major credit card. $link_ids = (isset($_REQUEST['link_ids']) ? $_REQUEST['link_ids'] : array()); if (isset($_REQUEST['link_id'])) : array_push($link_ids, $_REQUEST['link_id']); endif; - if (isset($GLOBALS['fwp_post']['confirm']) and $GLOBALS['fwp_post']['confirm']=='Undelete'): - if (isset($GLOBALS['fwp_post']['link_action']) and is_array($GLOBALS['fwp_post']['link_action'])) : - $actions = $GLOBALS['fwp_post']['link_action']; + if (MyPHP::post('confirm')=='Undelete'): + if ( is_array(MyPHP::post('link_action')) ) : + $actions = MyPHP::post('link_action'); else : $actions = array(); endif; @@ -1068,7 +1080,7 @@ function fwp_syndication_manage_page_update_box ($object = NULL, $box = NULL) { <p class="heads-up"><strong>Note:</strong> Automatic updates are currently turned <strong>off</strong>. New posts from your feeds will not be syndicated until you manually check for them here. You can turn on automatic - updates under <a href="admin.php?page=<?php print $GLOBALS['fwp_path']; ?>/feeds-page.php">Feed & Update Settings<a></a>.</p> + updates under <a href="<?php print $object->admin_page_href('feeds-page.php'); ?>">Feed & Update Settings<a></a>.</p> <?php endif; ?> @@ -1104,7 +1116,7 @@ function fwp_feedfinder_page () { function fwp_switchfeed_page () { global $wpdb, $wp_db_version; - global $fwp_post; + global $fwp_post, $fwp_path; // If this is a POST, validate source and user credentials FeedWordPressCompatibility::validate_http_request(/*action=*/ 'feedwordpress_switchfeed', /*capability=*/ 'manage_links'); @@ -1121,7 +1133,7 @@ function fwp_switchfeed_page () { <div class="updated"><p><a href="<?php print $fwp_post['feed_link']; ?>"><?php print esc_html($fwp_post['feed_title']); ?></a> has been added as a contributing site, using the feed at <<a href="<?php print $fwp_post['feed']; ?>"><?php print esc_html($fwp_post['feed']); ?></a>>. -| <a href="admin.php?page=<?php print $GLOBALS['fwp_path'] ?>/feeds-page.php&link_id=<?php print $link_id; ?>">Configure settings</a>.</p></div> +| <a href="admin.php?page=<?php print $fwp_path; ?>/feeds-page.php&link_id=<?php print $link_id; ?>">Configure settings</a>.</p></div> <?php else: ?> <div class="updated"><p>There was a problem adding the feed. [SQL: <?php echo esc_html(mysql_error()); ?>]</p></div> <?php endif; diff --git a/wp-content/plugins/feedwordpress/performance-page.php b/wp-content/plugins/feedwordpress/performance-page.php index e1928d1fc6472cd2b521f88c8b616c3f9c645208..5f7be90f108efcf207f91c8513277ac9e7d2c243 100644 --- a/wp-content/plugins/feedwordpress/performance-page.php +++ b/wp-content/plugins/feedwordpress/performance-page.php @@ -25,7 +25,7 @@ class FeedWordPressPerformancePage extends FeedWordPressAdminPage { if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') : $this->accept_POST($fwp_post); - do_action('feedwordpress_admin_page_performance_save', $GLOBALS['fwp_post'], $this); + do_action('feedwordpress_admin_page_performance_save', $fwp_post, $this); endif; //////////////////////////////////////////////// diff --git a/wp-content/plugins/feedwordpress/readme.txt b/wp-content/plugins/feedwordpress/readme.txt index e711e099617e5d9254f93a49af40f8a749d4b431..96abc75bd6e20b2bf1640f85461477fd029fd20b 100644 --- a/wp-content/plugins/feedwordpress/readme.txt +++ b/wp-content/plugins/feedwordpress/readme.txt @@ -4,7 +4,7 @@ Donate link: http://feedwordpress.radgeek.com/ Tags: syndication, aggregation, feed, atom, rss Requires at least: 3.0 Tested up to: 3.5.1 -Stable tag: 2013.0503 +Stable tag: 2013.0504 FeedWordPress syndicates content from feeds you choose into your WordPress weblog. @@ -94,6 +94,17 @@ outs, see the documentation at the [FeedWordPress project homepage][]. == Changelog == += 2012.0504 = + +* BUGFIX: PHP 5.4 compatibility -- includes some more extensive fixes to + compatibility issues with PHP 5.4's handling of global variables + +* MODULE REORGANIZATION: Should ensures that all needed submodules will be + properly included regardless of whether you are installing from github, + from SVN, or from the WordPress plugins page. If you've been getting + fatal errors about required modules not being found, this release should + hopefully resolve the issue. + = 2012.0503 = * BUGFIX: Works properly again with WordPress installations that use a