Postie - Version 1.4.29

Version Description

(2013.01.19) = * Fixed bug where manually running Postie worked, but calling get_mail.php directly did not.

Download this release

Release Info

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

Code changes from version 1.4.27 to 1.4.29

config_form.php CHANGED
@@ -76,12 +76,6 @@
76
  <div class="updated"><p><?php _e($messages[$_GET['message']], 'postie'); ?></p></div>
77
  <?php endif; ?>
78
 
79
-
80
-
81
- <form name="postie-options" method="post">
82
- <input type="hidden" name="action" value="reset" />
83
- <input name="Submit" value="<?php _e("Reset Settings To Defaults", 'postie') ?> &raquo;" type="submit" class='button'>
84
- </form>
85
  <form name="postie-options" method='post'>
86
  <input type="hidden" name="action" value="runpostie" />
87
  <input name="Submit" value="<?php _e("Run Postie", 'postie'); ?> &raquo;" type="submit" class='button'>
@@ -139,8 +133,8 @@
139
  <?php _e("POP3-SSL", 'postie'); ?> - 995 <br />
140
  </span>
141
  </th>
142
- <td>
143
- <input name='postie-settings[mail_server_port]' type="text" id='postie-settings-mail_server_port' value="<?php echo $mail_server_port; ?>" size="6" />
144
  </td>
145
  </tr>
146
  <tr>
@@ -230,18 +224,19 @@
230
 
231
  <?php echo BuildBooleanSelect(__("Allow Anyone To Post Via Email"), "postie-settings[turn_authorization_off]", $turn_authorization_off, "Changing this to yes is NOT RECOMMEDED - anything that gets sent in will automatically be posted. This could make it easier to compromise your server - YOU HAVE BEEN WARNED."); ?>
232
  <tr>
233
- <th scope="row"><?php _e('Roles That Can Post:', 'postie') ?>
234
- <br />
235
- <span class='recommendation'><?php _e("This allows you to grant access to other users to post if they have the proper access level", 'postie'); ?></span></th>
 
236
  <td>
237
- <table>
238
- <tr><th>Administrator role can always post.</th>
239
- <?php
240
- foreach ($wp_roles->role_names as $roleId => $name) {
241
- $name = translate_user_role($name);
242
- $role = $wp_roles->get_role($roleId);
243
- if ($roleId != "administrator") {
244
- ?>
245
  <tr>
246
  <td>
247
  <input type='checkbox' value='1' name='postie-settings[role_access][<?php echo $roleId; ?>]' <?php echo ($role->has_cap("post_via_postie")) ? 'checked="checked"' : "" ?> >
@@ -249,6 +244,14 @@
249
  </td>
250
  </tr>
251
  <?php
 
 
 
 
 
 
 
 
252
  }
253
  }
254
  ?>
@@ -320,7 +323,6 @@
320
  <th width="33%" valign="top" scope="row"><?php _e('Default Title:', 'postie') ?> </th>
321
  <td>
322
  <input name='postie-settings[default_title]' type="text" id='postie-settings-default_title' value="<?php echo $default_title; ?>" size="50" /><br />
323
- <br />
324
  </td>
325
  </tr>
326
  <tr>
@@ -351,12 +353,12 @@
351
  </td>
352
  </tr>
353
  </table>
354
- <a style='cursor:pointer;' onclick='showAdvanced("message-advanced", "message-advanced-arrow");'><span id="message-advanced-arrow">&#9654;</span> Advanced options</a>
355
- <div id="message-advanced" style='display:none;'>
356
  <table class='form-table'>
357
  <?php
358
  echo BuildBooleanSelect("Wrap content in pre tags", "postie-settings[wrap_pre]", $wrap_pre);
359
- echo BuildBooleanSelect("Filter newlines", "postie-settings[filternewlines]", $filternewlines, "Set to no if using markdown or textitle syntax");
360
  echo BuildBooleanSelect("Replace newline characters with html line breaks (&lt;br /&gt;)", "postie-settings[convertnewline]", $convertnewline);
361
  echo BuildBooleanSelect("Return rejected mail to sender", "postie-settings[return_to_sender]", $return_to_sender);
362
  ?>
@@ -386,7 +388,7 @@
386
  </td>
387
  </tr>
388
  <?php echo BuildBooleanSelect("Decode Quoted Printable Data", "postie-settings[message_dequote]", $message_dequote); ?>
389
- <?php echo BuildTextArea("Supported File Types", "postie-settings[supported_file_types]", $supported_file_types, "Put each type on a single line."); ?>
390
  <?php echo BuildTextArea("Banned File Names", "postie-settings[banned_files_list]", $banned_files_list, "Put each file name on a single line.Files matching this list will never be posted to your blog. You can use wildcards such as *.xls, or *.* for all files"); ?>
391
  <?php echo BuildBooleanSelect("Drop The Signature From Mail", "postie-settings[drop_signature]", $drop_signature); ?>
392
  <?php echo BuildTextArea("Signature Patterns", "postie-settings[sig_pattern_list]", $sig_pattern_list, "Put each pattern on a separate line and make sure to escape any special characters."); ?>
@@ -502,8 +504,9 @@
502
  <?php _e('Video 1 file types:') ?><br /><span class='recommendation'>
503
  <?php _e('Use the video template 1 for these files types (separated by commas)', 'postie') ?></span> </th>
504
  <td>
505
- <input name='postie-settings[video1types]' type="text" id='postie-settings-video1types'
506
- value="<?php if ($video1types != '') echo $video1types; ?>" size="40" /> </td>
 
507
  </tr>
508
  <tr><td colspan="2"><hr /></td></tr>
509
  <tr>
@@ -551,8 +554,8 @@
551
  <?php _e('Use the video template 2 for these files types (separated by commas)', 'postie') ?></span> <br />
552
  </th>
553
  <td>
554
- <input name='postie-settings[video2types]' type="text" id='postie-settings-video2types'
555
- value="<?php if ($video2types != '') echo $video2types; ?>" size="40" />
556
  </td>
557
  </tr>
558
  <tr><td colspan="2"><hr /></td></tr>
@@ -601,7 +604,7 @@
601
 
602
  </th>
603
  <td>
604
- <input name='postie-settings[audiotypes]' type="text" id='postie-settings-audiotypes' value="<?php if ($audiotypes != '') echo $audiotypes; ?>" size="40" />
605
  </td>
606
  </tr>
607
  </table>
@@ -686,6 +689,10 @@
686
 
687
  </p>
688
  </form>
 
 
 
 
689
  </div>
690
 
691
  <?php $iconDir = get_option('siteurl') . '/' . PLUGINDIR . '/postie/icons'; ?>
76
  <div class="updated"><p><?php _e($messages[$_GET['message']], 'postie'); ?></p></div>
77
  <?php endif; ?>
78
 
 
 
 
 
 
 
79
  <form name="postie-options" method='post'>
80
  <input type="hidden" name="action" value="runpostie" />
81
  <input name="Submit" value="<?php _e("Run Postie", 'postie'); ?> &raquo;" type="submit" class='button'>
133
  <?php _e("POP3-SSL", 'postie'); ?> - 995 <br />
134
  </span>
135
  </th>
136
+ <td valign="top">
137
+ <br/><input name='postie-settings[mail_server_port]' type="text" id='postie-settings-mail_server_port' value="<?php echo $mail_server_port; ?>" size="6" />
138
  </td>
139
  </tr>
140
  <tr>
224
 
225
  <?php echo BuildBooleanSelect(__("Allow Anyone To Post Via Email"), "postie-settings[turn_authorization_off]", $turn_authorization_off, "Changing this to yes is NOT RECOMMEDED - anything that gets sent in will automatically be posted. This could make it easier to compromise your server - YOU HAVE BEEN WARNED."); ?>
226
  <tr>
227
+ <th scope="row">
228
+ <?php _e('Roles That Can Post:', 'postie') ?><br />
229
+ <span class='recommendation'><?php _e("This allows you to grant access to other users to post if they have the proper access level. Administrators can always post.", 'postie'); ?></span>
230
+ </th>
231
  <td>
232
+ <br />
233
+ <table class="checkbox-table">
234
+ <?php
235
+ foreach ($wp_roles->role_names as $roleId => $name) {
236
+ $name = translate_user_role($name);
237
+ $role = $wp_roles->get_role($roleId);
238
+ if ($roleId != "administrator") {
239
+ ?>
240
  <tr>
241
  <td>
242
  <input type='checkbox' value='1' name='postie-settings[role_access][<?php echo $roleId; ?>]' <?php echo ($role->has_cap("post_via_postie")) ? 'checked="checked"' : "" ?> >
244
  </td>
245
  </tr>
246
  <?php
247
+ } else {
248
+ ?>
249
+ <tr>
250
+ <td>
251
+ <input type='checkbox' value='1' disabled='disabled' checked='checked' > <?php echo $name; ?>
252
+ </td>
253
+ </tr>
254
+ <?php
255
  }
256
  }
257
  ?>
323
  <th width="33%" valign="top" scope="row"><?php _e('Default Title:', 'postie') ?> </th>
324
  <td>
325
  <input name='postie-settings[default_title]' type="text" id='postie-settings-default_title' value="<?php echo $default_title; ?>" size="50" /><br />
 
326
  </td>
327
  </tr>
328
  <tr>
353
  </td>
354
  </tr>
355
  </table>
356
+ <a style='cursor:pointer;' onclick='showAdvanced("message-advanced", "message-advanced-arrow");'><span id="message-advanced-arrow">&#9660;</span> Advanced options</a>
357
+ <div id="message-advanced" >
358
  <table class='form-table'>
359
  <?php
360
  echo BuildBooleanSelect("Wrap content in pre tags", "postie-settings[wrap_pre]", $wrap_pre);
361
+ echo BuildBooleanSelect("Filter newlines", "postie-settings[filternewlines]", $filternewlines, "Retain newlines from plain text. Set to no if using markdown or textitle syntax");
362
  echo BuildBooleanSelect("Replace newline characters with html line breaks (&lt;br /&gt;)", "postie-settings[convertnewline]", $convertnewline);
363
  echo BuildBooleanSelect("Return rejected mail to sender", "postie-settings[return_to_sender]", $return_to_sender);
364
  ?>
388
  </td>
389
  </tr>
390
  <?php echo BuildBooleanSelect("Decode Quoted Printable Data", "postie-settings[message_dequote]", $message_dequote); ?>
391
+ <?php echo BuildTextArea("Supported MIME Types", "postie-settings[supported_file_types]", $supported_file_types, "Add just the type (not the subtype). Text, Video, Audio, Image and Multipart are always supported. Put each type on a single line."); ?>
392
  <?php echo BuildTextArea("Banned File Names", "postie-settings[banned_files_list]", $banned_files_list, "Put each file name on a single line.Files matching this list will never be posted to your blog. You can use wildcards such as *.xls, or *.* for all files"); ?>
393
  <?php echo BuildBooleanSelect("Drop The Signature From Mail", "postie-settings[drop_signature]", $drop_signature); ?>
394
  <?php echo BuildTextArea("Signature Patterns", "postie-settings[sig_pattern_list]", $sig_pattern_list, "Put each pattern on a separate line and make sure to escape any special characters."); ?>
504
  <?php _e('Video 1 file types:') ?><br /><span class='recommendation'>
505
  <?php _e('Use the video template 1 for these files types (separated by commas)', 'postie') ?></span> </th>
506
  <td>
507
+ <br/><input name='postie-settings[video1types]' type="text" id='postie-settings-video1types'
508
+ value="<?php if ($video1types != '') echo $video1types; ?>" size="40" />
509
+ </td>
510
  </tr>
511
  <tr><td colspan="2"><hr /></td></tr>
512
  <tr>
554
  <?php _e('Use the video template 2 for these files types (separated by commas)', 'postie') ?></span> <br />
555
  </th>
556
  <td>
557
+ <br/><input name='postie-settings[video2types]' type="text" id='postie-settings-video2types'
558
+ value="<?php if ($video2types != '') echo $video2types; ?>" size="40" />
559
  </td>
560
  </tr>
561
  <tr><td colspan="2"><hr /></td></tr>
604
 
605
  </th>
606
  <td>
607
+ <br/><input name='postie-settings[audiotypes]' type="text" id='postie-settings-audiotypes' value="<?php if ($audiotypes != '') echo $audiotypes; ?>" size="40" />
608
  </td>
609
  </tr>
610
  </table>
689
 
690
  </p>
691
  </form>
692
+ <form name="postie-options" method="post">
693
+ <input type="hidden" name="action" value="reset" />
694
+ <input name="Submit" value="<?php _e("Reset Settings To Defaults", 'postie') ?>" type="submit" class='button'> (Your Mail server settings will be retained)
695
+ </form>
696
  </div>
697
 
698
  <?php $iconDir = get_option('siteurl') . '/' . PLUGINDIR . '/postie/icons'; ?>
css/style.css CHANGED
@@ -14,8 +14,7 @@ table.form-table {
14
  table.form-table td {
15
  line-height:1em;
16
  margin:0;
17
- padding:0;
18
- /* font-size:1em; */
19
  }
20
  table.form-table th {
21
  width:40%;
@@ -39,3 +38,6 @@ div.simpleTabs-content li li {
39
  div.simpleTabs-content li li li {
40
  list-style-type:circle;
41
  }
 
 
 
14
  table.form-table td {
15
  line-height:1em;
16
  margin:0;
17
+ padding:10px;
 
18
  }
19
  table.form-table th {
20
  width:40%;
38
  div.simpleTabs-content li li li {
39
  list-style-type:circle;
40
  }
41
+ table.checkbox-table td {
42
+ padding:0px;
43
+ }
docs/Changes.txt CHANGED
@@ -10,6 +10,15 @@ 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.27 (2013.01.17) =
14
  * Updated sample plugin for extending Postie.
15
  * Updated documentation for template variables.
10
  Attachments are now processed in the order they were attached.
11
 
12
  == CHANGELOG ==
13
+ = 1.4.29 (2013.01.19) =
14
+ * Fixed bug where manually running Postie worked, but calling get_mail.php directly did not.
15
+
16
+ = 1.4.28 (2013.01.18) =
17
+ * Fixed bug in "reset settings to default" where the protocol wasn't being retained.
18
+ * More cleanup and clarification on settings screen.
19
+ * Fixed bug where excerpts weren't getting set if "Filter newlines" was set to "Yes"
20
+ * Removed logic to increase memory size.
21
+
22
  = 1.4.27 (2013.01.17) =
23
  * Updated sample plugin for extending Postie.
24
  * Updated documentation for template variables.
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
9
- Stable tag: 1.4.27
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
9
+ Stable tag: 1.4.29
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
docs/TODO.txt CHANGED
@@ -1,5 +1,7 @@
1
  provide a location for custom icons. update docs about location.
2
  reply logic not adding to comments
 
 
3
 
4
  replace native imap with flourish
5
  replace MIME parser
@@ -38,4 +40,3 @@ fix postie settings http://alisothegeek.com/2011/01/wordpress-settings-api-tutor
38
  * TODO - fix corruption of rtf attachments
39
  * TODO - add port checking in tests
40
  * TODO - non-image uploads get ignored in content when using autogallery - see replaceimageplaceholders
41
- * TODO - code to set featured image
1
  provide a location for custom icons. update docs about location.
2
  reply logic not adding to comments
3
+ hide/disable config options that don't apply
4
+ code to set featured image
5
 
6
  replace native imap with flourish
7
  replace MIME parser
40
  * TODO - fix corruption of rtf attachments
41
  * TODO - add port checking in tests
42
  * TODO - non-image uploads get ignored in content when using autogallery - see replaceimageplaceholders
 
get_mail.php CHANGED
@@ -8,28 +8,20 @@ if (file_exists($wp_config_path . DIRECTORY_SEPARATOR . "wp-config.php")) {
8
  include_once (dirname($wp_config_path)) . DIRECTORY_SEPARATOR . "wp-config.php";
9
  }
10
 
11
- $wp_content_path = dirname(dirname(dirname(__FILE__)));
12
-
13
- DebugEcho("wp_content_path: $wp_content_path");
14
- if (file_exists($wp_content_path . DIRECTORY_SEPARATOR . "filterPostie.php")) {
15
- DebugEcho("found filterPostie.php in wp-content");
16
- include_once ($wp_content_path . DIRECTORY_SEPARATOR . "filterPostie.php");
17
- }
18
-
19
  require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mimedecode.php');
20
  require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'postie-functions.php');
21
  if (!function_exists('file_get_html'))
22
  require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'simple_html_dom.php');
23
 
24
- if (!ini_get('safe_mode')) {
25
- $original_mem_limit = ini_get('memory_limit');
26
- ini_set('memory_limit', -1);
27
- ini_set('max_execution_time', 300);
28
- }
29
-
30
  EchoInfo("Starting mail fetch");
31
  EchoInfo("Time: " . date('Y-m-d H:i:s', time()) . " GMT");
32
  include('Revision');
 
 
 
 
 
 
33
 
34
  $test_email = null;
35
  $config = get_option('postie-settings');
@@ -79,7 +71,4 @@ foreach ($emails as $email) {
79
  if (function_exists('memory_get_usage'))
80
  EchoInfo("memory at end of e-mail processing:" . memory_get_usage());
81
 
82
- if (!ini_get('safe_mode')) {
83
- ini_set('memory_limit', $original_mem_limit);
84
- }
85
  ?>
8
  include_once (dirname($wp_config_path)) . DIRECTORY_SEPARATOR . "wp-config.php";
9
  }
10
 
 
 
 
 
 
 
 
 
11
  require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mimedecode.php');
12
  require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'postie-functions.php');
13
  if (!function_exists('file_get_html'))
14
  require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'simple_html_dom.php');
15
 
 
 
 
 
 
 
16
  EchoInfo("Starting mail fetch");
17
  EchoInfo("Time: " . date('Y-m-d H:i:s', time()) . " GMT");
18
  include('Revision');
19
+ $wp_content_path = dirname(dirname(dirname(__FILE__)));
20
+ DebugEcho("wp_content_path: $wp_content_path");
21
+ if (file_exists($wp_content_path . DIRECTORY_SEPARATOR . "filterPostie.php")) {
22
+ DebugEcho("found filterPostie.php in wp-content");
23
+ include_once ($wp_content_path . DIRECTORY_SEPARATOR . "filterPostie.php");
24
+ }
25
 
26
  $test_email = null;
27
  $config = get_option('postie-settings');
71
  if (function_exists('memory_get_usage'))
72
  EchoInfo("memory at end of e-mail processing:" . memory_get_usage());
73
 
 
 
 
74
  ?>
postie-functions.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /*
4
- $Id: postie-functions.php 654713 2013-01-18 06:03:56Z WayneAllen $
5
  */
6
 
7
  //to turn on debug output add the following line to wp-config.php
@@ -49,27 +49,6 @@ function postie_disable_revisions($restore = false) {
49
  }
50
  }
51
 
52
- function postie_increase_memory($restore = false) {
53
- global $_postie_original_memory_limit, $_postie_original_max_execution_time;
54
-
55
- if (!ini_get('safe_mode')) {
56
- if (!$restore) {
57
-
58
- $_postie_original_memory_limit = ini_get('memory_limit');
59
- $_postie_original_max_execution_time = ini_get('max_execution_time');
60
- ini_set('memory_limit', -1);
61
- ini_set('max_execution_time', 300);
62
- } else {
63
- if (isset($_postie_original_memory_limit)) {
64
- ini_set('memory_limit', $_postie_original_memory_limit);
65
- }
66
- if (isset($_postie_original_max_execution_time)) {
67
- ini_set('max_execution_time', $_postie_original_max_execution_time);
68
- }
69
- }
70
- }
71
- }
72
-
73
  /* this function is necessary for wildcard matching on non-posix systems */
74
  if (!function_exists('fnmatch')) {
75
 
@@ -331,7 +310,6 @@ function CreatePost($poster, $mimeDecodedEmail, $post_id, &$is_reply, $config) {
331
  */
332
  function PostEmail($poster, $mimeDecodedEmail, $config) {
333
  postie_disable_revisions();
334
- postie_increase_memory();
335
  extract($config);
336
 
337
  /* in order to do attachments correctly, we need to associate the
@@ -368,7 +346,6 @@ function PostEmail($poster, $mimeDecodedEmail, $config) {
368
  }
369
  }
370
  postie_disable_revisions(true);
371
- postie_increase_memory(true);
372
  DebugEcho("Done");
373
  }
374
 
@@ -2229,8 +2206,10 @@ function tag_Excerpt(&$content, $filterNewLines, $convertNewLines) {
2229
  $content = str_replace($matches[0], "", $content);
2230
  $post_excerpt = $matches[1];
2231
  DebugEcho("excerpt found: $post_excerpt");
2232
- if ($filterNewLines)
2233
- $post_excerpt = filter_newlines($post_excerpt, $convertNewLines);
 
 
2234
  }
2235
  return $post_excerpt;
2236
  }
@@ -2360,7 +2339,7 @@ function BuildTextArea($label, $id, $current_value, $recommendation = NULL) {
2360
  }
2361
  $html.="</th>";
2362
 
2363
- $html .="<td><textarea cols=40 rows=3 name='$id' id='$id'>";
2364
  $current_value = preg_split("/[,\r\n]+/", trim($current_value));
2365
  if (is_array($current_value)) {
2366
  foreach ($current_value as $item) {
@@ -2377,7 +2356,7 @@ function BuildTextArea($label, $id, $current_value, $recommendation = NULL) {
2377
  function config_ResetToDefault() {
2378
  $newconfig = config_GetDefaults();
2379
  $config = get_option('postie-settings');
2380
- $save_keys = array('mail_password', 'mail_server', 'mail_server_port', 'mail_userid', 'iinput_protocol');
2381
  foreach ($save_keys as $key)
2382
  $newconfig[$key] = $config[$key];
2383
  update_option('postie-settings', $newconfig);
@@ -2460,7 +2439,7 @@ function config_GetDefaults() {
2460
  'sig_pattern_list' => array('--', '---'),
2461
  'smtp' => array(),
2462
  'start_image_count_at_zero' => false,
2463
- 'supported_file_types' => array('video', 'application'),
2464
  'turn_authorization_off' => false,
2465
  'time_offset' => get_option('gmt_offset'),
2466
  'video1template' => $simple_link,
@@ -2564,7 +2543,7 @@ function config_UpgradeOld() {
2564
  if (!isset($config["BANNED_FILES_LIST"]))
2565
  $config["BANNED_FILES_LIST"] = array();
2566
  if (!isset($config["SUPPORTED_FILE_TYPES"]))
2567
- $config["SUPPORTED_FILE_TYPES"] = array("video", "application");
2568
  if (!isset($config["AUTHORIZED_ADDRESSES"]))
2569
  $config["AUTHORIZED_ADDRESSES"] = array();
2570
  if (!isset($config["MAIL_SERVER"]))
1
  <?php
2
 
3
  /*
4
+ $Id: postie-functions.php 655045 2013-01-18 22:10:20Z WayneAllen $
5
  */
6
 
7
  //to turn on debug output add the following line to wp-config.php
49
  }
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  /* this function is necessary for wildcard matching on non-posix systems */
53
  if (!function_exists('fnmatch')) {
54
 
310
  */
311
  function PostEmail($poster, $mimeDecodedEmail, $config) {
312
  postie_disable_revisions();
 
313
  extract($config);
314
 
315
  /* in order to do attachments correctly, we need to associate the
346
  }
347
  }
348
  postie_disable_revisions(true);
 
349
  DebugEcho("Done");
350
  }
351
 
2206
  $content = str_replace($matches[0], "", $content);
2207
  $post_excerpt = $matches[1];
2208
  DebugEcho("excerpt found: $post_excerpt");
2209
+ if ($filterNewLines){
2210
+ DebugEcho("filtering newlines from excerpt");
2211
+ filter_newlines($post_excerpt, $convertNewLines);
2212
+ }
2213
  }
2214
  return $post_excerpt;
2215
  }
2339
  }
2340
  $html.="</th>";
2341
 
2342
+ $html .="<td><br /><textarea cols=40 rows=3 name='$id' id='$id'>";
2343
  $current_value = preg_split("/[,\r\n]+/", trim($current_value));
2344
  if (is_array($current_value)) {
2345
  foreach ($current_value as $item) {
2356
  function config_ResetToDefault() {
2357
  $newconfig = config_GetDefaults();
2358
  $config = get_option('postie-settings');
2359
+ $save_keys = array('mail_password', 'mail_server', 'mail_server_port', 'mail_userid', 'input_protocol');
2360
  foreach ($save_keys as $key)
2361
  $newconfig[$key] = $config[$key];
2362
  update_option('postie-settings', $newconfig);
2439
  'sig_pattern_list' => array('--', '---'),
2440
  'smtp' => array(),
2441
  'start_image_count_at_zero' => false,
2442
+ 'supported_file_types' => array( 'application'),
2443
  'turn_authorization_off' => false,
2444
  'time_offset' => get_option('gmt_offset'),
2445
  'video1template' => $simple_link,
2543
  if (!isset($config["BANNED_FILES_LIST"]))
2544
  $config["BANNED_FILES_LIST"] = array();
2545
  if (!isset($config["SUPPORTED_FILE_TYPES"]))
2546
+ $config["SUPPORTED_FILE_TYPES"] = array( "application");
2547
  if (!isset($config["AUTHORIZED_ADDRESSES"]))
2548
  $config["AUTHORIZED_ADDRESSES"] = array();
2549
  if (!isset($config["MAIL_SERVER"]))
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.27
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 654713 2013-01-18 06:03:56Z 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.29
8
  Author: Wayne Allen
9
  Author URI: http://allens-home.com/
10
  License: GPL2
27
  */
28
 
29
  /*
30
+ $Id: postie.php 655566 2013-01-20 05:47:38Z WayneAllen $
31
  */
32
 
33
  define("POSTIE_ROOT", dirname(__FILE__));
postie_test.php CHANGED
@@ -41,7 +41,7 @@ $images = array("Test.png", "Test.jpg", "Test.gif");
41
  <p><i><?php _e('Only required for international character set support', 'postie') ?></i></p>
42
  <?php
43
  EchoInfo("iconv: " . ((HasIconvInstalled()) ? __('yes', 'postie') : __('no', 'postie')));
44
- EchoInfo("imap <small>(required for subjects)</small>: " . ((function_exists('imap_mime_header_decode')) ? __('yes', 'postie') : __('no', 'postie')));
45
  ?>
46
 
47
  <h2>Clock Tests</h2>
@@ -72,7 +72,8 @@ $images = array("Test.png", "Test.jpg", "Test.gif");
72
  EchoInfo("Unable to connect. The server said:");
73
  EchoInfo($mail_server->error());
74
  } else {
75
- EchoInfo("Sucessful " . strtoupper($config['input_protocol']) . " connection on port {$config["mail_server_port"]}");
 
76
  }
77
  }
78
  break;
41
  <p><i><?php _e('Only required for international character set support', 'postie') ?></i></p>
42
  <?php
43
  EchoInfo("iconv: " . ((HasIconvInstalled()) ? __('yes', 'postie') : __('no', 'postie')));
44
+ EchoInfo("imap (required for subjects): " . ((function_exists('imap_mime_header_decode')) ? __('yes', 'postie') : __('no', 'postie')));
45
  ?>
46
 
47
  <h2>Clock Tests</h2>
72
  EchoInfo("Unable to connect. The server said:");
73
  EchoInfo($mail_server->error());
74
  } else {
75
+ EchoInfo("Successful " . strtoupper($config['input_protocol']) . " connection on port {$config["mail_server_port"]}");
76
+ EchoInfo("# of waiting messages: " .$mail_server->getNumberOfMessages());
77
  }
78
  }
79
  break;
readme.html CHANGED
@@ -363,6 +363,9 @@ must name the icons according to the following scheme:</p>
363
 
364
  <pre><code>{filetype}-{size}.png</code></pre>
365
 
 
 
 
366
  <p>For example, for word documents, you could use:</p>
367
 
368
  <pre><code>doc-32.png</code></pre>
363
 
364
  <pre><code>{filetype}-{size}.png</code></pre>
365
 
366
+ <p>NOTE THAT ANY CUSTOM FILES ADDED TO THE POSTIE DIRECTORY WILL BE DELETED IF YOU
367
+ USE THE NORMAL WORDPRESS UPGRADE PROCESS.</p>
368
+
369
  <p>For example, for word documents, you could use:</p>
370
 
371
  <pre><code>doc-32.png</code></pre>
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
9
- Stable tag: 1.4.27
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -416,6 +416,15 @@ All script, style and body tags are stripped from html emails.
416
  Attachments are now processed in the order they were attached.
417
 
418
  == CHANGELOG ==
 
 
 
 
 
 
 
 
 
419
  = 1.4.27 (2013.01.17) =
420
  * Updated sample plugin for extending Postie.
421
  * Updated documentation for template variables.
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5
9
+ Stable tag: 1.4.29
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
416
  Attachments are now processed in the order they were attached.
417
 
418
  == CHANGELOG ==
419
+ = 1.4.29 (2013.01.19) =
420
+ * Fixed bug where manually running Postie worked, but calling get_mail.php directly did not.
421
+
422
+ = 1.4.28 (2013.01.18) =
423
+ * Fixed bug in "reset settings to default" where the protocol wasn't being retained.
424
+ * More cleanup and clarification on settings screen.
425
+ * Fixed bug where excerpts weren't getting set if "Filter newlines" was set to "Yes"
426
+ * Removed logic to increase memory size.
427
+
428
  = 1.4.27 (2013.01.17) =
429
  * Updated sample plugin for extending Postie.
430
  * Updated documentation for template variables.