WP RSS Aggregator - Version 4.5.1

Version Description

(2014-08-26) = * Fixed bug: Last import feed item count stays at zero. * Fixed bug: Datetime::setTimestamp error when using PHP 5.2 or earlier. * Fixed bug: The display limit was not working. * Fixed bug: Minor bug in licensing.

Download this release

Release Info

Developer jeangalea
Plugin Icon 128x128 WP RSS Aggregator
Version 4.5.1
Comparing to
See all releases

Code changes from version 4.5 to 4.5.1

changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  4.5 (2014-08-25)
2
  New Feature: Bulk importer allows you to create multiple feed sources at once.
3
  Enhanced: Improved OPML importer with added hooks.
1
+ 4.5.1 (2014-08-26)
2
+ Fixed bug: Last import feed item count stays at zero.
3
+ Fixed bug: Datetime::setTimestamp error when using PHP 5.2 or earlier.
4
+ Fixed bug: The display limit was not working.
5
+ Fixed bug: Minor bug in licensing.
6
+
7
  4.5 (2014-08-25)
8
  New Feature: Bulk importer allows you to create multiple feed sources at once.
9
  Enhanced: Improved OPML importer with added hooks.
includes/OPML.php CHANGED
@@ -111,7 +111,7 @@ class WPRSS_OPML {
111
  // Check for category attribute
112
  if ( isset( $element['category'] ) ) {
113
  // split categories by comma, and trim each category string
114
- $result['categories'] = array_map( 'trim', explode(',', $category) );
115
  }
116
 
117
  /*
111
  // Check for category attribute
112
  if ( isset( $element['category'] ) ) {
113
  // split categories by comma, and trim each category string
114
+ $result['categories'] = array_map( 'trim', explode(',', $element['category']) );
115
  }
116
 
117
  /*
includes/feed-display.php CHANGED
@@ -77,12 +77,10 @@
77
  * @since 3.0
78
  */
79
  function wprss_get_feed_items_query( $settings ) {
80
- if ( isset( $settings['posts_per_page'] ) ) {
81
- $posts_per_page = $settings['posts_per_page'];
82
- } elseif( isset( $settings['feed_limit'] ) ) {
83
- $posts_per_page = isset( $settings['feed_limit'] );
84
  } else {
85
- $posts_per_page = -1;
86
  }
87
  global $paged;
88
  if ( get_query_var('paged') ) {
77
  * @since 3.0
78
  */
79
  function wprss_get_feed_items_query( $settings ) {
80
+ if( isset( $settings['feed_limit'] ) ) {
81
+ $posts_per_page = $settings['feed_limit'];
 
 
82
  } else {
83
+ $posts_per_page = wprss_get_general_setting('feed_limit');
84
  }
85
  global $paged;
86
  if ( get_query_var('paged') ) {
includes/feed-importing.php CHANGED
@@ -392,7 +392,7 @@
392
  $item = apply_filters( 'wprss_insert_post_item_conditionals', $item, $feed_ID, $permalink );
393
 
394
  // If the item is not NULL, continue to inserting the feed item post into the DB
395
- if ( $item !== NULL ) {
396
 
397
  $feed_item = apply_filters(
398
  'wprss_populate_post_data',
@@ -440,6 +440,11 @@
440
  wprss_log_obj( 'Failed to insert post', $feed_item, 'wprss_items_insert_post > wp_insert_post' );
441
  }
442
  }
 
 
 
 
 
443
  }
444
  }
445
 
392
  $item = apply_filters( 'wprss_insert_post_item_conditionals', $item, $feed_ID, $permalink );
393
 
394
  // If the item is not NULL, continue to inserting the feed item post into the DB
395
+ if ( $item !== NULL && !is_bool($item) ) {
396
 
397
  $feed_item = apply_filters(
398
  'wprss_populate_post_data',
440
  wprss_log_obj( 'Failed to insert post', $feed_item, 'wprss_items_insert_post > wp_insert_post' );
441
  }
442
  }
443
+ // If the item is TRUE, then a hook function in the filter inserted the item.
444
+ // increment the inserted counter
445
+ elseif ( is_bool($item) && $item === TRUE ) {
446
+ $items_inserted++;
447
+ }
448
  }
449
  }
450
 
includes/feed-processing.php CHANGED
@@ -600,7 +600,7 @@
600
  $to_delete = array_slice( $feed_items, $start );
601
  // log -- for now
602
  foreach( $to_delete as $fi ) {
603
- wprss_log_obj( "To delete" , $fi->ID );
604
  }
605
  }
606
 
600
  $to_delete = array_slice( $feed_items, $start );
601
  // log -- for now
602
  foreach( $to_delete as $fi ) {
603
+ //wprss_log_obj( "To delete" , $fi->ID );
604
  }
605
  }
606
 
includes/licensing.php CHANGED
@@ -149,7 +149,7 @@ function wprss_license_settings() {
149
  // Settings Section
150
  add_settings_section(
151
  "wprss_settings_{$addon_id}_licenses_section",
152
- $addon_name . __( 'License', 'wprss' ),
153
  '__return_empty_string',
154
  'wprss_settings_license_keys'
155
  );
@@ -245,7 +245,7 @@ function wprss_activate_license_button( $args ) {
245
  }
246
 
247
 
248
- //add_action( 'admin_init', 'wprss_process_addon_license' );
249
  /**
250
  * Handles the activation/deactivation process
251
  *
@@ -275,15 +275,11 @@ function wprss_process_addon_license() {
275
  }
276
 
277
  // Prepare the action to take
278
- if ( isset( $_POST['wprss_kf_license_activate'] ) ) {
279
- $action = 'activate';
 
 
 
280
  }
281
- elseif ( isset( $_POST['wprss_kf_license_deactivate'] ) ) {
282
- $action = 'deactivate';
283
- }
284
- else continue;
285
-
286
- // Call the API accordingly
287
- wprss_edd_licensing_api( $id, $license, $action );
288
  }
289
- }
149
  // Settings Section
150
  add_settings_section(
151
  "wprss_settings_{$addon_id}_licenses_section",
152
+ $addon_name .' '. __( 'License', 'wprss' ),
153
  '__return_empty_string',
154
  'wprss_settings_license_keys'
155
  );
245
  }
246
 
247
 
248
+ add_action( 'admin_init', 'wprss_process_addon_license' );
249
  /**
250
  * Handles the activation/deactivation process
251
  *
275
  }
276
 
277
  // Prepare the action to take
278
+ if ( isset( $_POST["wprss_{$id}_license_activate"] ) ) {
279
+ wprss_edd_activate_license( $id, $license );
280
+ }
281
+ elseif ( isset( $_POST["wprss_{$id}_license_deactivate"] ) ) {
282
+ wprss_edd_deactivate_license( $id, $license );
283
  }
 
 
 
 
 
 
 
284
  }
285
+ }
readme.txt CHANGED
@@ -1,13 +1,13 @@
1
  === WP RSS Aggregator ===
2
- Contributors: jeangalea, Mekku, xedin.unknown
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X9GP6BL4BLXBJ
4
  Plugin URI: http://www.wprssaggregator.com
5
  Tags: rss, feeds, aggregation, rss to post, autoblog aggregator, rss import, feed aggregator, rss aggregator, multiple rss feeds, multi rss feeds, rss multi importer, feed import, feed import, multiple feed import, feed aggregation, rss feader, feed reader, feed to post, multiple feeds, multi feed importer, multi feed import, multi import, autoblogging, autoblogger
6
  Requires at least: 3.3
7
- Tested up to: 3.9.1
8
- Stable tag: 4.5
9
  License: GPLv2 or later
10
- Imports and aggregates multiple RSS Feeds using SimplePie. Outputs feeds sorted by date (latest first).
11
 
12
 
13
  == Description ==
@@ -163,6 +163,12 @@ The full documentation section can be found on the [WP RSS Aggregator website](w
163
 
164
  == Changelog ==
165
 
 
 
 
 
 
 
166
  = 4.5 (2014-08-25) =
167
  * New Feature: Bulk importer allows you to create multiple feed sources at once.
168
  * Enhanced: Improved OPML importer with added hooks.
1
  === WP RSS Aggregator ===
2
+ Contributors: jeangalea, Mekku, xedin.unknown, mrkzahra
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X9GP6BL4BLXBJ
4
  Plugin URI: http://www.wprssaggregator.com
5
  Tags: rss, feeds, aggregation, rss to post, autoblog aggregator, rss import, feed aggregator, rss aggregator, multiple rss feeds, multi rss feeds, rss multi importer, feed import, feed import, multiple feed import, feed aggregation, rss feader, feed reader, feed to post, multiple feeds, multi feed importer, multi feed import, multi import, autoblogging, autoblogger
6
  Requires at least: 3.3
7
+ Tested up to: 4.0
8
+ Stable tag: 4.5.1
9
  License: GPLv2 or later
10
+ The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
11
 
12
 
13
  == Description ==
163
 
164
  == Changelog ==
165
 
166
+ = 4.5.1 (2014-08-26) =
167
+ * Fixed bug: Last import feed item count stays at zero.
168
+ * Fixed bug: Datetime::setTimestamp error when using PHP 5.2 or earlier.
169
+ * Fixed bug: The display limit was not working.
170
+ * Fixed bug: Minor bug in licensing.
171
+
172
  = 4.5 (2014-08-25) =
173
  * New Feature: Bulk importer allows you to create multiple feed sources at once.
174
  * Enhanced: Improved OPML importer with added hooks.
wp-rss-aggregator.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: WP RSS Aggregator
4
  Plugin URI: http://www.wprssaggregator.com
5
- Description: Imports and aggregates multiple RSS Feeds using SimplePie
6
- Version: 4.5
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
@@ -29,7 +29,7 @@
29
 
30
  /**
31
  * @package WPRSSAggregator
32
- * @version 4.5
33
  * @since 1.0
34
  * @author Jean Galea <info@wprssaggregator.com>
35
  * @copyright Copyright (c) 2012-2014, Jean Galea
@@ -43,7 +43,7 @@
43
 
44
  // Set the version number of the plugin.
45
  if( !defined( 'WPRSS_VERSION' ) )
46
- define( 'WPRSS_VERSION', '4.5', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
@@ -474,15 +474,21 @@
474
  $timezone = new DateTimeZone( $timezone_str );
475
 
476
  // The date in the local timezone.
477
- $date = new DateTime( null, $timezone );
478
- $date->setTimestamp( $timestamp );
 
 
 
 
 
 
479
  $date_str = $date->format( 'Y-m-d H:i:s' );
480
 
481
  // Pretend the local date is UTC to get the timestamp
482
  // to pass to date_i18n().
483
  $utc_timezone = new DateTimeZone( 'UTC' );
484
  $utc_date = new DateTime( $date_str, $utc_timezone );
485
- $timestamp = $utc_date->getTimestamp();
486
 
487
  return date_i18n( $format, $timestamp, true );
488
  }
2
  /*
3
  Plugin Name: WP RSS Aggregator
4
  Plugin URI: http://www.wprssaggregator.com
5
+ Description: The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
6
+ Version: 4.5.1
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
29
 
30
  /**
31
  * @package WPRSSAggregator
32
+ * @version 4.5.1
33
  * @since 1.0
34
  * @author Jean Galea <info@wprssaggregator.com>
35
  * @copyright Copyright (c) 2012-2014, Jean Galea
43
 
44
  // Set the version number of the plugin.
45
  if( !defined( 'WPRSS_VERSION' ) )
46
+ define( 'WPRSS_VERSION', '4.5.1', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
474
  $timezone = new DateTimeZone( $timezone_str );
475
 
476
  // The date in the local timezone.
477
+ $date = new DateTime( null, $timezone );
478
+ if ( version_compare(PHP_VERSION, '5.3', '>=') ) {
479
+ $date->setTimestamp( $timestamp );
480
+ } else {
481
+ $datetime = getdate( intval($timestamp) );
482
+ $date->setDate( $datetime['year'] , $datetime['mon'] , $datetime['mday'] );
483
+ $date->setTime( $datetime['hours'] , $datetime['minutes'] , $datetime['seconds'] );
484
+ }
485
  $date_str = $date->format( 'Y-m-d H:i:s' );
486
 
487
  // Pretend the local date is UTC to get the timestamp
488
  // to pass to date_i18n().
489
  $utc_timezone = new DateTimeZone( 'UTC' );
490
  $utc_date = new DateTime( $date_str, $utc_timezone );
491
+ $timestamp = intval( $utc_date->format('U') );
492
 
493
  return date_i18n( $format, $timestamp, true );
494
  }