Postie - Version 1.9.29

Version Description

(2019-02-18) = * Fix delay, command was not being removed from content in all cases * Additional debug output to track down attachment issue

Download this release

Release Info

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

Code changes from version 1.9.28 to 1.9.29

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.9.28 (2019-01-10) =
39
  * fix IMAP end of message detection
40
  * remove insecure cURL settings
35
  Attachments are now processed in the order they were attached.
36
 
37
  == CHANGELOG ==
38
+ = 1.9.29 (2019-02-18) =
39
+ * Fix delay, command was not being removed from content in all cases
40
+ * Additional debug output to track down attachment issue
41
+
42
  = 1.9.28 (2019-01-10) =
43
  * fix IMAP end of message detection
44
  * remove insecure cURL settings
docs/Postie.txt CHANGED
@@ -7,7 +7,7 @@ Tags: e-mail, email, post-by-email
7
  Requires PHP: 5.3
8
  Requires at least: 4.0
9
  Tested up to: 5.0
10
- Stable tag: 1.9.28
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
7
  Requires PHP: 5.3
8
  Requires at least: 4.0
9
  Tested up to: 5.0
10
+ Stable tag: 1.9.29
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
docs/TODO.txt CHANGED
@@ -12,6 +12,7 @@ Comment not being created when subject contains category command []. I.e. listse
12
  Comment not being created when subject contains fomat or type. I.e. re: image//Image subject
13
 
14
  Other
 
15
  Process single email at a time and don't delete unless successful
16
  Change all "filters" to "addons" and allow them to be disabled (i.e. turn off processing for "date:"
17
  Add default comment status (like post status) wp_set_comment_status
12
  Comment not being created when subject contains fomat or type. I.e. re: image//Image subject
13
 
14
  Other
15
+ detect links to enbedable content and remove anchor tag <a href="https://youtube.com?...">https://youtube.com</a>
16
  Process single email at a time and don't delete unless successful
17
  Change all "filters" to "addons" and allow them to be disabled (i.e. turn off processing for "date:"
18
  Add default comment status (like post status) wp_set_comment_status
postie-filters.php CHANGED
@@ -183,8 +183,10 @@ function filter_Start($content, $config) {
183
  if ($pos === false) {
184
  return $content;
185
  }
186
- DebugEcho("start filter $start");
187
  $content = substr($content, $pos + strlen($start), strlen($content));
 
 
188
  }
189
  return $content;
190
  }
@@ -253,7 +255,7 @@ function filter_RemoveSignatureWorker(&$html, $pattern) {
253
  DebugEcho("filter_RemoveSignatureWorker sig new text:\n$presig");
254
  $html->innertext = $presig;
255
  } else {
256
- DebugEcho("filter_RemoveSignatureWorker: signature not found: '$sig' " . strlen($sig));
257
  }
258
  } else {
259
  DebugEcho("filter_RemoveSignatureWorker: no matches " . preg_last_error() . " '$pattern' $html");
@@ -288,8 +290,10 @@ function filter_End($content, $config) {
288
  if ($pos === false) {
289
  return $content;
290
  }
291
- DebugEcho("end filter: $end");
292
  $content = substr($content, 0, $pos);
 
 
293
  }
294
  return $content;
295
  }
183
  if ($pos === false) {
184
  return $content;
185
  }
186
+ DebugEcho("filter_Start: start filter $start");
187
  $content = substr($content, $pos + strlen($start), strlen($content));
188
+ } else {
189
+ DebugEcho("filter_Start: no start filter");
190
  }
191
  return $content;
192
  }
255
  DebugEcho("filter_RemoveSignatureWorker sig new text:\n$presig");
256
  $html->innertext = $presig;
257
  } else {
258
+ //DebugEcho("filter_RemoveSignatureWorker: signature not found: '$sig' " . strlen($sig));
259
  }
260
  } else {
261
  DebugEcho("filter_RemoveSignatureWorker: no matches " . preg_last_error() . " '$pattern' $html");
290
  if ($pos === false) {
291
  return $content;
292
  }
293
+ DebugEcho("filter_End: end filter: $end");
294
  $content = substr($content, 0, $pos);
295
+ } else {
296
+ DebugEcho("filter_End: no end filter");
297
  }
298
  return $content;
299
  }
postie-tags.php CHANGED
@@ -183,7 +183,8 @@ function tag_Delay(&$content, $message_date, $config) {
183
 
184
  DebugEcho("tag_Delay: calculated delay: $delay");
185
  DebugEcho("tag_Delay: interval: $interval");
186
- $content = preg_replace("/delay:$matches[1]/i", "", $content);
 
187
  break;
188
  }
189
  }
@@ -446,6 +447,7 @@ function tag_Date(&$content, $message_date) {
446
 
447
  function tag_Tags(&$content, $config) {
448
  $defaultTags = $config['default_post_tags'];
 
449
  $post_tags = array();
450
  foreach (postie_content_lines($content, $config) as $line) {
451
  //DebugEcho("tag_Tags: line: $line");
@@ -462,5 +464,6 @@ function tag_Tags(&$content, $config) {
462
  if (count($post_tags) == 0 && is_array($defaultTags)) {
463
  $post_tags = $defaultTags;
464
  }
 
465
  return $post_tags;
466
  }
183
 
184
  DebugEcho("tag_Delay: calculated delay: $delay");
185
  DebugEcho("tag_Delay: interval: $interval");
186
+ DebugEcho("tag_Delay: replacing: $matches[0]");
187
+ $content = preg_replace("/$matches[0]/i", "", $content);
188
  break;
189
  }
190
  }
447
 
448
  function tag_Tags(&$content, $config) {
449
  $defaultTags = $config['default_post_tags'];
450
+ DebugEcho("tag_Tags: starting");
451
  $post_tags = array();
452
  foreach (postie_content_lines($content, $config) as $line) {
453
  //DebugEcho("tag_Tags: line: $line");
464
  if (count($post_tags) == 0 && is_array($defaultTags)) {
465
  $post_tags = $defaultTags;
466
  }
467
+ DebugEcho("tag_Tags: done");
468
  return $post_tags;
469
  }
postie.class.php CHANGED
@@ -180,7 +180,13 @@ class Postie {
180
  }
181
 
182
  function save_attachments_worker(&$attachments, $post_id, $config) {
 
183
  foreach ($attachments as &$attachment) {
 
 
 
 
 
184
  if (array_key_exists('filename', $attachment) && !empty($attachment['filename'])) {
185
  DebugEcho('save_attachments_worker: ' . $attachment['filename']);
186
 
@@ -260,6 +266,7 @@ class Postie {
260
  break;
261
  }
262
  }
 
263
  }
264
 
265
  function parse_template($fileid, $type, $template, $orig_filename, $icon = "") {
@@ -342,7 +349,7 @@ class Postie {
342
  return;
343
  }
344
  DebugEcho("Registered filters for $hook");
345
- DebugDump($wp_filter[$hook]->callbacks);
346
  }
347
 
348
  function save_attachment(&$attachment, $post_id, $config) {
180
  }
181
 
182
  function save_attachments_worker(&$attachments, $post_id, $config) {
183
+ DebugEcho("save_attachments_worker: start");
184
  foreach ($attachments as &$attachment) {
185
+ foreach ($attachment as $key => $value) {
186
+ if ($key != 'data') {
187
+ DebugEcho("save_attachments_worker: [$key]: $value");
188
+ }
189
+ }
190
  if (array_key_exists('filename', $attachment) && !empty($attachment['filename'])) {
191
  DebugEcho('save_attachments_worker: ' . $attachment['filename']);
192
 
266
  break;
267
  }
268
  }
269
+ DebugEcho("save_attachments_worker: end");
270
  }
271
 
272
  function parse_template($fileid, $type, $template, $orig_filename, $icon = "") {
349
  return;
350
  }
351
  DebugEcho("Registered filters for $hook");
352
+ //DebugDump($wp_filter[$hook]->callbacks);
353
  }
354
 
355
  function save_attachment(&$attachment, $post_id, $config) {
postie.php CHANGED
@@ -4,14 +4,14 @@
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.9.28
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL3
11
  Text Domain: postie
12
  */
13
 
14
- /* Copyright (c) 2015-17 Wayne Allen (email : wayne@postieplugin.com)
15
 
16
  This program is free software: you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
@@ -28,14 +28,14 @@
28
  */
29
 
30
  /*
31
- $Id: postie.php 2010324 2019-01-11 01:55:47Z WayneAllen $
32
  */
33
 
34
  if (!defined('WPINC')) {
35
  die; // Exit if accessed directly
36
  }
37
 
38
- define('POSTIE_VERSION', '1.9.28');
39
  define('POSTIE_ROOT', dirname(__FILE__));
40
  define('POSTIE_URL', WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
41
 
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.9.29
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL3
11
  Text Domain: postie
12
  */
13
 
14
+ /* Copyright (c) 2015-19 Wayne Allen (email : wayne@postieplugin.com)
15
 
16
  This program is free software: you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
28
  */
29
 
30
  /*
31
+ $Id: postie.php 2033607 2019-02-18 21:27:06Z WayneAllen $
32
  */
33
 
34
  if (!defined('WPINC')) {
35
  die; // Exit if accessed directly
36
  }
37
 
38
+ define('POSTIE_VERSION', '1.9.29');
39
  define('POSTIE_ROOT', dirname(__FILE__));
40
  define('POSTIE_URL', WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
41
 
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: e-mail, email, post-by-email
7
  Requires PHP: 5.3
8
  Requires at least: 4.0
9
  Tested up to: 5.0
10
- Stable tag: 1.9.28
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -107,6 +107,10 @@ All script, style and body tags are stripped from html emails.
107
  Attachments are now processed in the order they were attached.
108
 
109
  == CHANGELOG ==
 
 
 
 
110
  = 1.9.28 (2019-01-10) =
111
  * fix IMAP end of message detection
112
  * remove insecure cURL settings
7
  Requires PHP: 5.3
8
  Requires at least: 4.0
9
  Tested up to: 5.0
10
+ Stable tag: 1.9.29
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
107
  Attachments are now processed in the order they were attached.
108
 
109
  == CHANGELOG ==
110
+ = 1.9.29 (2019-02-18) =
111
+ * Fix delay, command was not being removed from content in all cases
112
+ * Additional debug output to track down attachment issue
113
+
114
  = 1.9.28 (2019-01-10) =
115
  * fix IMAP end of message detection
116
  * remove insecure cURL settings