Postie - Version 1.8.40

Version Description

(2017-04-24) = * Ensure date set to current date when configured * Compatibility testing with WordPress 4.7.4

Download this release

Release Info

Developer WayneAllen
Plugin Icon 128x128 Postie
Version 1.8.40
Comparing to
See all releases

Code changes from version 1.8.39 to 1.8.40

Files changed (5) hide show
  1. docs/Changes.txt +4 -0
  2. docs/Postie.txt +2 -2
  3. postie-functions.php +18 -9
  4. postie.php +3 -3
  5. readme.txt +6 -2
docs/Changes.txt CHANGED
@@ -35,6 +35,10 @@ All script, style and body tags are stripped from html emails.
35
  Attachments are now processed in the order they were attached.
36
 
37
  == CHANGELOG ==
 
 
 
 
38
  = 1.8.39 (2017-04-18) =
39
  * Ensure the time zone is set when calculating the post time.
40
  * Additional debug output
35
  Attachments are now processed in the order they were attached.
36
 
37
  == CHANGELOG ==
38
+ = 1.8.40 (2017-04-24) =
39
+ * Ensure date set to current date when configured
40
+ * Compatibility testing with WordPress 4.7.4
41
+
42
  = 1.8.39 (2017-04-18) =
43
  * Ensure the time zone is set when calculating the post time.
44
  * Additional debug output
docs/Postie.txt CHANGED
@@ -5,8 +5,8 @@ Author URI: http://allens-home.com/
5
  Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
- Tested up to: 4.7.3
9
- Stable tag: 1.8.39
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
5
  Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
+ Tested up to: 4.7.4
9
+ Stable tag: 1.8.40
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
postie-functions.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- $Id: postie-functions.php 1639971 2017-04-18 17:02:24Z WayneAllen $
4
  */
5
 
6
  class PostiePostModifiers {
@@ -410,10 +410,12 @@ function postie_create_post($poster, $mimeDecodedEmail, $post_id, &$is_reply, $c
410
  }
411
  } else {
412
  DebugEcho("date header missing");
 
413
  }
414
- $message_date = tag_Date($content, $message_date, 'html' == $config['prefer_text_type']);
415
 
416
- list($post_date, $delay) = tag_Delay($content, $message_date, (!$config['ignore_email_date'] && $config['use_time_offset']) ? $config['time_offset'] : 0);
 
 
417
  if ($fulldebug) {
418
  DebugEcho("post date: $content");
419
  }
@@ -1530,7 +1532,9 @@ function tag_Status(&$content, $currentstatus) {
1530
  return $poststatus;
1531
  }
1532
 
1533
- function tag_Delay(&$content, $message_date = NULL, $offset = 0) {
 
 
1534
  //DebugEcho("tag_Delay: $content");
1535
  $delay = 0;
1536
  $matches = array();
@@ -1578,13 +1582,18 @@ function tag_Delay(&$content, $message_date = NULL, $offset = 0) {
1578
  }
1579
  DebugEcho("tag_Delay: timezone: $tzs");
1580
 
1581
- if (empty($message_date)) {
1582
  $dateInSeconds = new DateTime(current_time('mysql'));
1583
- DebugEcho("tag_Delay: using current date: " . $dateInSeconds->format(DATE_RFC2822));
1584
  } else {
1585
- DebugEcho("tag_Delay: using message date(1): $message_date");
1586
- $dateInSeconds = new DateTime($message_date);
1587
- DebugEcho("tag_Delay: using message date(2): " . $dateInSeconds->format(DATE_RFC2822));
 
 
 
 
 
1588
  }
1589
 
1590
  if ($delay > 0) {
1
  <?php
2
  /*
3
+ $Id: postie-functions.php 1644329 2017-04-24 20:51:24Z WayneAllen $
4
  */
5
 
6
  class PostiePostModifiers {
410
  }
411
  } else {
412
  DebugEcho("date header missing");
413
+ $message_date = current_time('mysql');
414
  }
 
415
 
416
+ $message_date = tag_Date($content, $message_date);
417
+
418
+ list($post_date, $delay) = tag_Delay($content, $message_date, $config);
419
  if ($fulldebug) {
420
  DebugEcho("post date: $content");
421
  }
1532
  return $poststatus;
1533
  }
1534
 
1535
+ function tag_Delay(&$content, $message_date, $config) {
1536
+ $offset = (!$config['ignore_email_date'] && $config['use_time_offset']) ? $config['time_offset'] : 0;
1537
+
1538
  //DebugEcho("tag_Delay: $content");
1539
  $delay = 0;
1540
  $matches = array();
1582
  }
1583
  DebugEcho("tag_Delay: timezone: $tzs");
1584
 
1585
+ if ($config['ignore_email_date']) {
1586
  $dateInSeconds = new DateTime(current_time('mysql'));
1587
+ DebugEcho("tag_Delay: ignoring date: " . $dateInSeconds->format(DATE_RFC2822));
1588
  } else {
1589
+ if (empty($message_date)) {
1590
+ $dateInSeconds = new DateTime(current_time('mysql'));
1591
+ DebugEcho("tag_Delay: using current date: " . $dateInSeconds->format(DATE_RFC2822));
1592
+ } else {
1593
+ DebugEcho("tag_Delay: using message date(1): $message_date");
1594
+ $dateInSeconds = new DateTime($message_date);
1595
+ DebugEcho("tag_Delay: using message date(2): " . $dateInSeconds->format(DATE_RFC2822));
1596
+ }
1597
  }
1598
 
1599
  if ($delay > 0) {
postie.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Create posts via email. Significantly upgrades the Post by Email features of WordPress.
7
- Version: 1.8.39
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL2
@@ -28,7 +28,7 @@
28
  */
29
 
30
  /*
31
- $Id: postie.php 1639972 2017-04-18 17:04:13Z WayneAllen $
32
  */
33
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fException.php");
34
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fUnexpectedException.php");
@@ -60,7 +60,7 @@ if (!function_exists('file_get_html')) {
60
  require_once (plugin_dir_path(__FILE__) . 'simple_html_dom.php');
61
  }
62
 
63
- define('POSTIE_VERSION', '1.8.39');
64
  define("POSTIE_ROOT", dirname(__FILE__));
65
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
66
 
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Create posts via email. Significantly upgrades the Post by Email features of WordPress.
7
+ Version: 1.8.40
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL2
28
  */
29
 
30
  /*
31
+ $Id: postie.php 1644333 2017-04-24 21:01:07Z WayneAllen $
32
  */
33
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fException.php");
34
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fUnexpectedException.php");
60
  require_once (plugin_dir_path(__FILE__) . 'simple_html_dom.php');
61
  }
62
 
63
+ define('POSTIE_VERSION', '1.8.40');
64
  define("POSTIE_ROOT", dirname(__FILE__));
65
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
66
 
readme.txt CHANGED
@@ -5,8 +5,8 @@ Author URI: http://allens-home.com/
5
  Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
- Tested up to: 4.7.3
9
- Stable tag: 1.8.39
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -242,6 +242,10 @@ All script, style and body tags are stripped from html emails.
242
  Attachments are now processed in the order they were attached.
243
 
244
  == CHANGELOG ==
 
 
 
 
245
  = 1.8.39 (2017-04-18) =
246
  * Ensure the time zone is set when calculating the post time.
247
  * Additional debug output
5
  Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
+ Tested up to: 4.7.4
9
+ Stable tag: 1.8.40
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
242
  Attachments are now processed in the order they were attached.
243
 
244
  == CHANGELOG ==
245
+ = 1.8.40 (2017-04-24) =
246
+ * Ensure date set to current date when configured
247
+ * Compatibility testing with WordPress 4.7.4
248
+
249
  = 1.8.39 (2017-04-18) =
250
  * Ensure the time zone is set when calculating the post time.
251
  * Additional debug output