Postie - Version 1.4.40

Version Description

(2013.03.18) = * Fixed bug where categories specified by ID were not being correctly identified

Download this release

Release Info

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

Code changes from version 1.4.39 to 1.4.40

Files changed (8) hide show
  1. Revision +2 -2
  2. docs/Changes.txt +4 -1
  3. docs/Postie.txt +1 -1
  4. docs/TODO.txt +4 -0
  5. postie-functions.php +10 -7
  6. postie.php +2 -2
  7. postie_test.php +1 -1
  8. readme.txt +5 -2
Revision CHANGED
@@ -1,2 +1,2 @@
1
- Revision: 681890
2
- Last Changed Date: 2013-03-13 09:55:52 -0700 (Wed, 13 Mar 2013)
1
+ Revision: 683827
2
+ Last Changed Date: 2013-03-16 17:23:28 -0700 (Sat, 16 Mar 2013)
docs/Changes.txt CHANGED
@@ -10,7 +10,10 @@ All script, style and body tags are stripped from html emails.
10
  Attachments are now processed in the order they were attached.
11
 
12
  == CHANGELOG ==
13
- = 1.4.39 (future) =
 
 
 
14
  * Fixed bug where Postie supplied schedules were not always being correctly added to the cron
15
 
16
  = 1.4.38 (2013.03.12) =
10
  Attachments are now processed in the order they were attached.
11
 
12
  == CHANGELOG ==
13
+ = 1.4.40 (2013.03.18) =
14
+ * Fixed bug where categories specified by ID were not being correctly identified
15
+
16
+ = 1.4.39 (2013.03.14) =
17
  * Fixed bug where Postie supplied schedules were not always being correctly added to the cron
18
 
19
  = 1.4.38 (2013.03.12) =
docs/Postie.txt CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
- Stable tag: 1.4.39
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
+ Stable tag: 1.4.40
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
docs/TODO.txt CHANGED
@@ -11,6 +11,10 @@ automatically create category if it doesn't exist. new option to allow this feat
11
  WP MU support
12
  new command to set post status: published, draft, pending review, private
13
  support setting "post format"
 
 
 
 
14
 
15
  standardize tags
16
  fix postie settings http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
11
  WP MU support
12
  new command to set post status: published, draft, pending review, private
13
  support setting "post format"
14
+ rework attachment logic. video files can come through as application/octect-stream. Mail parsing should separate attachments
15
+ into buckets? i.e. video, image, other. Each gets processed differently. I.e. when gallery in turned on images don't get embedded
16
+ but videos do.
17
+ Maybe look at file extensions to supplement mime types
18
 
19
  standardize tags
20
  fix postie settings http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
postie-functions.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /*
4
- $Id: postie-functions.php 682015 2013-03-14 23:11:34Z WayneAllen $
5
  */
6
 
7
  //to turn on debug output add the following line to wp-config.php
@@ -2332,18 +2332,21 @@ function lookup_category($trial_category, $category_match) {
2332
 
2333
  $term = get_term_by('name', $trial_category, 'category');
2334
  if ($term !== false) {
2335
- DebugDump($term);
 
2336
  //then category is a named and found
2337
  return $term->term_id;
2338
  }
2339
- $term = get_term_by('id', $trial_category, 'category');
2340
- if (is_array($term)) {
 
2341
  DebugEcho("category: found by id $trial_category");
2342
- DebugDump($term);
2343
  //then cateogry was an ID and found
2344
- return $term['term_id'];
2345
  }
2346
- if (empty($found_category) && $category_match) {
 
2347
  DebugEcho("category wildcard lookup: $trial_category");
2348
  $sql_sub_name = 'SELECT term_id FROM ' . $wpdb->terms . ' WHERE name LIKE \'' . addslashes($trial_category) . '%\' limit 1';
2349
  $found_category = $wpdb->get_var($sql_sub_name);
1
  <?php
2
 
3
  /*
4
+ $Id: postie-functions.php 683869 2013-03-18 21:39:57Z WayneAllen $
5
  */
6
 
7
  //to turn on debug output add the following line to wp-config.php
2332
 
2333
  $term = get_term_by('name', $trial_category, 'category');
2334
  if ($term !== false) {
2335
+ DebugEcho("category: found by name $trial_category");
2336
+ //DebugDump($term);
2337
  //then category is a named and found
2338
  return $term->term_id;
2339
  }
2340
+
2341
+ $term = get_term_by('id', intval($trial_category), 'category');
2342
+ if ($term !== false) {
2343
  DebugEcho("category: found by id $trial_category");
2344
+ //DebugDump($term);
2345
  //then cateogry was an ID and found
2346
+ return $term->term_id;
2347
  }
2348
+
2349
+ if ($category_match) {
2350
  DebugEcho("category wildcard lookup: $trial_category");
2351
  $sql_sub_name = 'SELECT term_id FROM ' . $wpdb->terms . ' WHERE name LIKE \'' . addslashes($trial_category) . '%\' limit 1';
2352
  $found_category = $wpdb->get_var($sql_sub_name);
postie.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Signifigantly upgrades the posting by mail features of Word Press (See <a href='options-general.php?page=postie/postie.php'>Settings and options</a>) to configure your e-mail settings. See the <a href='http://wordpress.org/extend/plugins/postie/other_notes'>Readme</a> for usage. Visit the <a href='http://wordpress.org/support/plugin/postie'>postie forum</a> for support.
7
- Version: 1.4.39
8
  Author: Wayne Allen
9
  Author URI: http://allens-home.com/
10
  License: GPL2
@@ -27,7 +27,7 @@
27
  */
28
 
29
  /*
30
- $Id: postie.php 682015 2013-03-14 23:11:34Z WayneAllen $
31
  */
32
 
33
  define("POSTIE_ROOT", dirname(__FILE__));
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Signifigantly upgrades the posting by mail features of Word Press (See <a href='options-general.php?page=postie/postie.php'>Settings and options</a>) to configure your e-mail settings. See the <a href='http://wordpress.org/extend/plugins/postie/other_notes'>Readme</a> for usage. Visit the <a href='http://wordpress.org/support/plugin/postie'>postie forum</a> for support.
7
+ Version: 1.4.40
8
  Author: Wayne Allen
9
  Author URI: http://allens-home.com/
10
  License: GPL2
27
  */
28
 
29
  /*
30
+ $Id: postie.php 683869 2013-03-18 21:39:57Z WayneAllen $
31
  */
32
 
33
  define("POSTIE_ROOT", dirname(__FILE__));
postie_test.php CHANGED
@@ -48,7 +48,7 @@ $images = array("Test.png", "Test.jpg", "Test.gif");
48
  if (function_exists('imap_mime_header_decode')) {
49
  EchoInfo("imap: installed");
50
  } else {
51
- EchoInfo("Warning! Postie requires that imap be enabled.");
52
  }
53
 
54
  if (HasMbStringInstalled()) {
48
  if (function_exists('imap_mime_header_decode')) {
49
  EchoInfo("imap: installed");
50
  } else {
51
+ EchoInfo("Warning! Postie requires that imap be enabled if you are using IMAP, IMAP-SSL or POP3-SSL.");
52
  }
53
 
54
  if (HasMbStringInstalled()) {
readme.txt CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
- Stable tag: 1.4.39
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -426,7 +426,10 @@ All script, style and body tags are stripped from html emails.
426
  Attachments are now processed in the order they were attached.
427
 
428
  == CHANGELOG ==
429
- = 1.4.39 (future) =
 
 
 
430
  * Fixed bug where Postie supplied schedules were not always being correctly added to the cron
431
 
432
  = 1.4.38 (2013.03.12) =
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
+ Stable tag: 1.4.40
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
426
  Attachments are now processed in the order they were attached.
427
 
428
  == CHANGELOG ==
429
+ = 1.4.40 (2013.03.18) =
430
+ * Fixed bug where categories specified by ID were not being correctly identified
431
+
432
+ = 1.4.39 (2013.03.14) =
433
  * Fixed bug where Postie supplied schedules were not always being correctly added to the cron
434
 
435
  = 1.4.38 (2013.03.12) =