RSS Post Importer - Version 2.5.1

Version Description

Download this release

Release Info

Developer feedsapi
Plugin Icon 128x128 RSS Post Importer
Version 2.5.1
Comparing to
See all releases

Code changes from version 2.5.0 to 2.5.1

app/classes/admin/class-rss-pi-stats.php CHANGED
@@ -33,23 +33,23 @@ if (!class_exists("Rss_pi_stats")) {
33
  isset($_POST["rss_from_date"]) &&
34
  isset($_POST["rss_till_date"]))
35
  {
36
- $start_time = strtotime($_POST["rss_from_date"]);
37
- $end_time = strtotime($_POST["rss_till_date"]);
38
  } else {
39
-
40
-
41
  $date_today = date("Y-m-d");// current date
42
  $date_today_unix = strtotime($date_today);
43
  $date_seven_days_unix = strtotime(date("Y-m-d", strtotime($date_today)) . " -7 day");
44
-
45
  // for last seven days stats
46
  $start_time = $date_seven_days_unix;
47
  $end_time = $date_today_unix;
48
-
49
  /*Old Code working according to first post*/
50
  //$start_time = get_the_time("U", $oldest_post);
51
  //$end_time = get_the_time("U", $newest_post);
52
-
53
  }
54
 
55
  if ( isset($_POST["rss_filter_stats"]) && $start_time <= 0 || $end_time <= 0 ) {
@@ -118,8 +118,8 @@ function drawChart() {};
118
 
119
  /*
120
  * Prints the line chart between two dates
121
- * param $start_time : timestamp
122
- * param $end_time : timestamp
123
  */
124
  function get_line_chart_data_between($start_time, $end_time) {
125
 
@@ -287,7 +287,7 @@ function drawChart() {};
287
  function draw_pie_chart_js($pie_feeds_data, $feeds) {
288
 
289
  ?>
290
- var data_pie_chart = google.visualization.arrayToDataTable([
291
  <?php
292
  echo "['Feed', 'Posts imported'], \n";
293
 
@@ -430,12 +430,21 @@ function drawChart() {};
430
  }
431
 
432
  function show_date_pickers() {
 
 
 
 
 
 
 
 
 
433
  ?>
434
  <div class="rss_pi_stats_date">
435
  <div class="rss_filter_heading">Filter results:</div>
436
  <hr>
437
- <label>From: <input type="text" id="from_date" name="rss_from_date" value="<?php echo (isset($_POST["rss_from_date"])) ? $_POST["rss_from_date"] : ""; ?>" /> </label>
438
- <label>Till: <input type="text" id="till_date" name="rss_till_date" value="<?php echo (isset($_POST["rss_till_date"])) ? $_POST["rss_till_date"] : ""; ?>" /> </label>
439
  <input type="submit" id="submit-rss_filter_stats" name="rss_filter_stats" class="button button-primary button-large " value="Filter">
440
  <br>
441
  </div>
33
  isset($_POST["rss_from_date"]) &&
34
  isset($_POST["rss_till_date"]))
35
  {
36
+ $start_time = strtotime(sanitize_text_field($_POST["rss_from_date"]));
37
+ $end_time = strtotime(sanitize_text_field($_POST["rss_till_date"]));
38
  } else {
39
+
40
+
41
  $date_today = date("Y-m-d");// current date
42
  $date_today_unix = strtotime($date_today);
43
  $date_seven_days_unix = strtotime(date("Y-m-d", strtotime($date_today)) . " -7 day");
44
+
45
  // for last seven days stats
46
  $start_time = $date_seven_days_unix;
47
  $end_time = $date_today_unix;
48
+
49
  /*Old Code working according to first post*/
50
  //$start_time = get_the_time("U", $oldest_post);
51
  //$end_time = get_the_time("U", $newest_post);
52
+
53
  }
54
 
55
  if ( isset($_POST["rss_filter_stats"]) && $start_time <= 0 || $end_time <= 0 ) {
118
 
119
  /*
120
  * Prints the line chart between two dates
121
+ * param $start_time : timestamp
122
+ * param $end_time : timestamp
123
  */
124
  function get_line_chart_data_between($start_time, $end_time) {
125
 
287
  function draw_pie_chart_js($pie_feeds_data, $feeds) {
288
 
289
  ?>
290
+ var data_pie_chart = google.visualization.arrayToDataTable([
291
  <?php
292
  echo "['Feed', 'Posts imported'], \n";
293
 
430
  }
431
 
432
  function show_date_pickers() {
433
+ $from_date = $_POST['rss_from_date'] || '';
434
+ $till_date = $_POST['rss_till_date'] || '';
435
+
436
+ $from_date = sanitize_text_field($from_date);
437
+ $till_date = sanitize_text_field($till_date);
438
+
439
+ $from_date = (bool)strtotime($from_date) ? $from_date : '';
440
+ $till_date = (bool)strtotime($from_date) ? $till_date : '';
441
+
442
  ?>
443
  <div class="rss_pi_stats_date">
444
  <div class="rss_filter_heading">Filter results:</div>
445
  <hr>
446
+ <label>From: <input type="text" id="from_date" name="rss_from_date" value="<?php echo $from_date; ?>" /> </label>
447
+ <label>Till: <input type="text" id="till_date" name="rss_till_date" value="<?php echo $till_date; ?>" /> </label>
448
  <input type="submit" id="submit-rss_filter_stats" name="rss_filter_stats" class="button button-primary button-large " value="Filter">
449
  <br>
450
  </div>
index.php CHANGED
@@ -5,7 +5,7 @@
5
  Plugin URI: https://wordpress.org/plugins/rss-post-importer/
6
  Description: This plugin lets you set up an import posts from one or several rss-feeds and save them as posts on your site, simple and flexible.
7
  Author: feedsapi
8
- Version: 2.5.0
9
  Author URI: https://www.feedsapi.org/
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -32,7 +32,7 @@ if (!defined('RSS_PI_BASENAME')) {
32
  }
33
 
34
  if (!defined('RSS_PI_VERSION')) {
35
- define('RSS_PI_VERSION', '2.5.0');
36
  }
37
 
38
  if (!defined('RSS_PI_LOG_PATH')) {
5
  Plugin URI: https://wordpress.org/plugins/rss-post-importer/
6
  Description: This plugin lets you set up an import posts from one or several rss-feeds and save them as posts on your site, simple and flexible.
7
  Author: feedsapi
8
+ Version: 2.5.1
9
  Author URI: https://www.feedsapi.org/
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
32
  }
33
 
34
  if (!defined('RSS_PI_VERSION')) {
35
+ define('RSS_PI_VERSION', '2.5.1');
36
  }
37
 
38
  if (!defined('RSS_PI_LOG_PATH')) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.feedsapi.org/
4
  Tags: rss aggregation, wordpress autoblog aggregator, Autoblogger, rss autopost and syndicator, blog content curation, feedsyndicate, feedwordpress, multiple rss feed importer, rss feeds to post, content syndication, blog migration, yahoo pipes
5
  Requires at least: 3.5
6
  Tested up to: 4.7.4
7
- Stable tag: 2.5.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -128,6 +128,9 @@ Learn more (and get detailed instructions) in our [contribute guide](http://jetp
128
 
129
  == Change Log ==
130
 
 
 
 
131
  = Version 2.5.0 =
132
  * Security update
133
 
4
  Tags: rss aggregation, wordpress autoblog aggregator, Autoblogger, rss autopost and syndicator, blog content curation, feedsyndicate, feedwordpress, multiple rss feed importer, rss feeds to post, content syndication, blog migration, yahoo pipes
5
  Requires at least: 3.5
6
  Tested up to: 4.7.4
7
+ Stable tag: 2.5.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
128
 
129
  == Change Log ==
130
 
131
+ = Version 2.5.1 =
132
+ * Important security update
133
+
134
  = Version 2.5.0 =
135
  * Security update
136