FeedWordPress - Version 2009.0618

Version Description

Download this release

Release Info

Developer radgeek
Plugin Icon wp plugin FeedWordPress
Version 2009.0618
Comparing to
See all releases

Code changes from version 2009.0613 to 2009.0618

ChangeLog.text CHANGED
@@ -1,7 +1,22 @@
1
  FeedWordPress Change Log
2
  ========================
3
- Changes from 2009.0612 to Trunk
4
- -------------------------------
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  * INTERFACE/BUGFIX: WORDPRESS 2.8 CATEGORY BOX FIX. Thanks to a subtle
6
  change in class names between the WordPress 2.7 and 2.8 stylesheets,
7
  category boxes in the FeedWordPress settings interface tended to overflow
1
  FeedWordPress Change Log
2
  ========================
3
+ Changes from 2009.0613 to 2009.0618
4
+ -----------------------------------
5
+ * BUGFIX: MYSTERY ERRORS WITH WITH WP_Http_Fsockopen HTTP TRANSPORT
6
+ ELIMINATED: Thanks to a combination of a subtle bug in FeedWordPress,
7
+ and changes to the HTTP transport code in WordPress, a number of users
8
+ encountered an error in which any time they attempted to add a new feed
9
+ through the FeedFinder interface, FeedWordPress would fail and display
10
+ an HTTP request failure diagnostic message. The subtle bug has been
11
+ fixed, and with it, most of these errors should now be eliminated.
12
+
13
+ Be sure to upgrade your MagpieRSS to the most recent MagpieRSS version
14
+ after you have insalled FeedWordPress 2009.0618, or this bug fix will
15
+ not take effect.
16
+
17
+
18
+ Changes from 2009.0612 to 2009.0613
19
+ -----------------------------------
20
  * INTERFACE/BUGFIX: WORDPRESS 2.8 CATEGORY BOX FIX. Thanks to a subtle
21
  change in class names between the WordPress 2.7 and 2.8 stylesheets,
22
  category boxes in the FeedWordPress settings interface tended to overflow
MagpieRSS-upgrade/rss.php CHANGED
@@ -4,7 +4,7 @@
4
  * Author: Kellan Elliot-McCrea <kellan@protest.net>
5
  * WordPress development team <http://www.wordpress.org/>
6
  * Charles Johnson <technophilia@radgeek.com>
7
- * Version: 2009.0613
8
  * License: GPL
9
  *
10
  * Provenance:
@@ -1204,7 +1204,7 @@ endif;
1204
  version will be return, if it exists (and if MAGPIE_CACHE_FRESH_ONLY is off)
1205
  \*=======================================================================*/
1206
 
1207
- define('MAGPIE_VERSION', '2009.0613');
1208
 
1209
  $MAGPIE_ERROR = "";
1210
 
@@ -1392,6 +1392,9 @@ function magpie_error ($errormsg="") {
1392
  Output: an HTTP response object (see Snoopy.class.inc)
1393
  \*=======================================================================*/
1394
  function _fetch_remote_file ($url, $headers = "" ) {
 
 
 
1395
  // WordPress 2.7 has deprecated Snoopy. It's still there, for now, but
1396
  // I'd rather not rely on it.
1397
  if (function_exists('wp_remote_request')) :
4
  * Author: Kellan Elliot-McCrea <kellan@protest.net>
5
  * WordPress development team <http://www.wordpress.org/>
6
  * Charles Johnson <technophilia@radgeek.com>
7
+ * Version: 2009.0618
8
  * License: GPL
9
  *
10
  * Provenance:
1204
  version will be return, if it exists (and if MAGPIE_CACHE_FRESH_ONLY is off)
1205
  \*=======================================================================*/
1206
 
1207
+ define('MAGPIE_VERSION', '2009.0618');
1208
 
1209
  $MAGPIE_ERROR = "";
1210
 
1392
  Output: an HTTP response object (see Snoopy.class.inc)
1393
  \*=======================================================================*/
1394
  function _fetch_remote_file ($url, $headers = "" ) {
1395
+ // Ensure that we have constants set up, since they are used below.
1396
+ init();
1397
+
1398
  // WordPress 2.7 has deprecated Snoopy. It's still there, for now, but
1399
  // I'd rather not rely on it.
1400
  if (function_exists('wp_remote_request')) :
feedwordpress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: FeedWordPress
4
  Plugin URI: http://projects.radgeek.com/feedwordpress
5
  Description: simple and flexible Atom/RSS syndication for WordPress
6
- Version: 2009.0613
7
  Author: Charles Johnson
8
  Author URI: http://radgeek.com/
9
  License: GPL
@@ -507,7 +507,7 @@ for a production server.</p>
507
  endif;
508
  } /* function fwp_check_debug () */
509
 
510
- define('EXPECTED_MAGPIE_VERSION', '2009.0613');
511
  function fwp_check_magpie () {
512
  if (isset($_REQUEST['feedwordpress_magpie_fix'])) :
513
  if ($_REQUEST['feedwordpress_magpie_fix']=='ignored') :
@@ -1253,7 +1253,7 @@ class SyndicatedPost {
1253
  $default_custom_settings = array();
1254
  endif;
1255
 
1256
- $custom_settings = $this->link->settings['postmeta'];
1257
  if ($custom_settings) :
1258
  $custom_settings = unserialize($custom_settings);
1259
  endif;
@@ -1318,8 +1318,8 @@ class SyndicatedPost {
1318
  $this->post['meta']['syndication_item_hash'] = $this->update_hash();
1319
 
1320
  // Feed-by-feed options for author and category creation
1321
- $this->post['named']['unfamiliar']['author'] = $this->feedmeta['unfamiliar author'];
1322
- $this->post['named']['unfamiliar']['category'] = $this->feedmeta['unfamiliar category'];
1323
 
1324
  // Categories: start with default categories, if any
1325
  $fc = get_option("feedwordpress_syndication_cats");
@@ -1329,7 +1329,7 @@ class SyndicatedPost {
1329
  $this->post['named']['preset/category'] = array();
1330
  endif;
1331
 
1332
- if (is_array($this->feedmeta['cats'])) :
1333
  $this->post['named']['preset/category'] = array_merge($this->post['named']['preset/category'], $this->feedmeta['cats']);
1334
  endif;
1335
 
@@ -1358,7 +1358,7 @@ class SyndicatedPost {
1358
  $this->post['tags_input'] = array();
1359
  endif;
1360
 
1361
- if (is_array($this->feedmeta['tags'])) :
1362
  $this->post['tags_input'] = array_merge($this->post['tags_input'], $this->feedmeta['tags']);
1363
  endif;
1364
 
3
  Plugin Name: FeedWordPress
4
  Plugin URI: http://projects.radgeek.com/feedwordpress
5
  Description: simple and flexible Atom/RSS syndication for WordPress
6
+ Version: 2009.0618
7
  Author: Charles Johnson
8
  Author URI: http://radgeek.com/
9
  License: GPL
507
  endif;
508
  } /* function fwp_check_debug () */
509
 
510
+ define('EXPECTED_MAGPIE_VERSION', '2009.0618');
511
  function fwp_check_magpie () {
512
  if (isset($_REQUEST['feedwordpress_magpie_fix'])) :
513
  if ($_REQUEST['feedwordpress_magpie_fix']=='ignored') :
1253
  $default_custom_settings = array();
1254
  endif;
1255
 
1256
+ $custom_settings = (isset($this->link->settings['postmeta']) ? $this->link->settings['postmeta'] : null);
1257
  if ($custom_settings) :
1258
  $custom_settings = unserialize($custom_settings);
1259
  endif;
1318
  $this->post['meta']['syndication_item_hash'] = $this->update_hash();
1319
 
1320
  // Feed-by-feed options for author and category creation
1321
+ $this->post['named']['unfamiliar']['author'] = (isset($this->feedmeta['unfamiliar author']) ? $this->feedmeta['unfamiliar author'] : null);
1322
+ $this->post['named']['unfamiliar']['category'] = (isset($this->feedmeta['unfamiliar category']) ? $this->feedmeta['unfamiliar category'] : null);
1323
 
1324
  // Categories: start with default categories, if any
1325
  $fc = get_option("feedwordpress_syndication_cats");
1329
  $this->post['named']['preset/category'] = array();
1330
  endif;
1331
 
1332
+ if (isset($this->feedmeta['cats']) and is_array($this->feedmeta['cats'])) :
1333
  $this->post['named']['preset/category'] = array_merge($this->post['named']['preset/category'], $this->feedmeta['cats']);
1334
  endif;
1335
 
1358
  $this->post['tags_input'] = array();
1359
  endif;
1360
 
1361
+ if (isset($this->feedmeta['tags']) and is_array($this->feedmeta['tags'])) :
1362
  $this->post['tags_input'] = array_merge($this->post['tags_input'], $this->feedmeta['tags']);
1363
  endif;
1364
 
magpiemocklink.class.php CHANGED
@@ -1,4 +1,6 @@
1
  <?php
 
 
2
  class MagpieMockLink extends SyndicatedLink {
3
  var $url;
4
 
1
  <?php
2
+ require_once(dirname(__FILE__) . '/syndicatedlink.class.php');
3
+
4
  class MagpieMockLink extends SyndicatedLink {
5
  var $url;
6
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://projects.radgeek.com/feedwordpress/
4
  Tags: syndication, aggregation, feed, atom, rss
5
  Requires at least: 1.5
6
  Tested up to: 2.8
7
- Stable tag: 2009.0613
8
 
9
  FeedWordPress syndicates content from feeds you choose into your WordPress weblog.
10
 
4
  Tags: syndication, aggregation, feed, atom, rss
5
  Requires at least: 1.5
6
  Tested up to: 2.8
7
+ Stable tag: 2009.0618
8
 
9
  FeedWordPress syndicates content from feeds you choose into your WordPress weblog.
10
 
syndicatedlink.class.php CHANGED
@@ -61,9 +61,10 @@ class SyndicatedLink {
61
  // Read off feed settings from link_notes
62
  $notes = explode("\n", $this->link->link_notes);
63
  foreach ($notes as $note):
64
- list($key, $value) = explode(": ", $note, 2);
65
-
66
- if (strlen($key) > 0) :
 
67
  // Unescape and trim() off the whitespace.
68
  // Thanks to Ray Lischner for pointing out the
69
  // need to trim off whitespace.
@@ -298,10 +299,10 @@ class SyndicatedLink {
298
  $to_notes['update/processed'] = implode("\n", $to_notes['update/processed']);
299
  endif;
300
 
301
- if (is_array($to_notes['cats'])) :
302
  $to_notes['cats'] = implode(FEEDWORDPRESS_CAT_SEPARATOR, $to_notes['cats']);
303
  endif;
304
- if (is_array($to_notes['tags'])) :
305
  $to_notes['tags'] = implode(FEEDWORDPRESS_CAT_SEPARATOR, $to_notes['tags']);
306
  endif;
307
 
61
  // Read off feed settings from link_notes
62
  $notes = explode("\n", $this->link->link_notes);
63
  foreach ($notes as $note):
64
+ $pair = explode(": ", $note, 2);
65
+ $key = (isset($pair[0]) ? $pair[0] : null);
66
+ $value = (isset($pair[1]) ? $pair[1] : null);
67
+ if (!is_null($key) and !is_null($value)) :
68
  // Unescape and trim() off the whitespace.
69
  // Thanks to Ray Lischner for pointing out the
70
  // need to trim off whitespace.
299
  $to_notes['update/processed'] = implode("\n", $to_notes['update/processed']);
300
  endif;
301
 
302
+ if (isset($to_notes['cats']) and is_array($to_notes['cats'])) :
303
  $to_notes['cats'] = implode(FEEDWORDPRESS_CAT_SEPARATOR, $to_notes['cats']);
304
  endif;
305
+ if (isset($to_notes['tags']) and is_array($to_notes['tags'])) :
306
  $to_notes['tags'] = implode(FEEDWORDPRESS_CAT_SEPARATOR, $to_notes['tags']);
307
  endif;
308